Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4094621

frame shows incorrectly at (0,0) before being made visible by user

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 1.1.5, 1.2.0
    • client-libs
    • generic, sparc
    • generic, solaris_2.6

      Wehn I create and place a Frame, it briefly shows in the top left corner of the
      screen before showing in the position I place it.

      Here is code fragment to show the problem


      import java.awt.Dimension;
      import java.awt.Label;
      import java.awt.Frame;
      import java.awt.Toolkit;

      public class demo
      {
          public static void main(String[] args) {

      Frame f = new Frame("Loading JavaTest");
      f.add(new Label(" please stand by "), "Center");
      f.pack();

      Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
      Dimension fSize = f.getSize();
      f.setLocation(screenSize.width/2 - fSize.width/2, screenSize.height/2 - fSize.height/2);
      f.show();
          }
      }



      ------------------------------------
      Additional info: the jumnp to (0,0) now appears to be intermittent.
      Just now, I started the app and it did not jump;
      now I started it again and it did jump. Perhaps there is uninitialized
      data somewhere oin the Motif code.
      jonathan.gibbons@Eng 1997-11-25

            rkhansunw Robi Khan (Inactive)
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: