x86 JDK-1.2.2-O display problem with layout of buttons and choices

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P2
    • None
    • Affects Version/s: 1.2.1, 1.2.2
    • Component/s: client-libs
    • x86
    • solaris_2.6, solaris_7, solaris_9

      The following program should display a choice and 3 buttons in a flow
      layout manner. However, the choice overlaps the first button making
      it invisible. The 2nd button is partially overlapped by the choice.
      -----------------------------------------------------------------------------
      import java.awt.*;
      import java.awt.event.*;

      public class choice {

          public static void main(String argv[] ) {
              choice t = new choice();
              t.init (argv);
          }

          String []s = { "Choice 1",
                              "Choice 2",
                              "unselected choices",
                              "what choices do I have?",
                              "Will I pick the same thing in the future?",
                      };

          public void init ( String argv[]) {
              Frame f = new Frame("choice test");

              f.setLayout(new FlowLayout());
              Panel p = new Panel(new FlowLayout());

              Choice c = new Choice();
              for (int i = 0; i < s.length; i++)
                      c.addItem(s[i]);

              p.add(c);
              p.add(new Button("Button 1"));
              p.add(new Button("Button 2"));
              p.add(new Button("Button 3"));

              f.add(p);

              f.show();
              f.setSize(600, 200);

              f.addWindowListener(new WindowAdapter() {
                  public void windowClosing(WindowEvent we) {
                      System.exit(0);
                  }
              });
          }
      }
      ===============================================================================
      The following program should display a column of 3 buttons. However
      the text string of the first button is shortened by almost a half.
      The word "Make" is invisible.
      -------------------------------------------------------------------------------
      import java.awt.*;
      import java.awt.event.*;

      public class grid {

          public static void main(String argv[] ) {

              grid t = new grid();
              t.init (argv);
          }

          public void init ( String argv[]) {
              Frame f = new Frame("choice test");

              f.setLayout(new FlowLayout());
              Panel p = new Panel(new GridLayout(3, 0));

              p.add(new Button("MakeVisible"));
              p.add(new Button("Reset to Initial State"));
              p.add(new Button("Show Status"));

              f.add(p);

              f.show();
              f.setSize(200, 150);

              f.addWindowListener(new WindowAdapter() {
                  public void windowClosing(WindowEvent we) {
                      System.exit(0);
                  }
              });
          }
      }
      --------------------------------------------------------------------------------
      All these problems disappear if I ran the programs with the jdk1.1.8 release.
      Fixing this display problem would solve the many test problems that we're
      currently experiencing with the release of JCK1.2.2

            Assignee:
            Unassigned
            Reporter:
            Roger Pham (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: