JDK-4147333 : Frames appear in top left hand corner
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.1.6
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 1998-06-10
  • Updated: 2002-07-17
  • Resolved: 2002-07-17
Related Reports
Duplicate :  
Description

Name: mf23781			Date: 06/10/98


Frames appear at top left

A frame is displayed in the top left corner if no location is 
specified whereas in m114 it is displayed in a default location.

Defect 3616 considered a similar problem in which a frame is displayed
in the top left corner if it is resized immediately after showing.
This was not fixed in the JDK but a workaround was suggested in which
adding a delay between the show and resize fixes the problem.  In m116
this workaround no longer works.  The frame is always displayed in the 
top left corner.

Run the test case below to demonstrate. It creates 10 frames and
resizes them immediately after showing.  For frames 6 through 10 there
is a delay between the show and resize.  In m114 the first 5 are 
displayed in the top left corner and the second 5 are displayed in their 
proper locations.  In m116 they are all displayed in the top left corner.

Also fails with  AIX 116 and NT/95 116.

/******** FramePos.java ********/

import java.awt.*;

public class FramePos
{
  public static void main(String argv[])
  {
    for (int i = 1; i <= 10; i++) {
      Frame fr = new Frame("FramePos " + i);
      fr.setSize(300,200);
      fr.setVisible(true);
      if (i >= 6)
        try {Thread.sleep(300);} catch (InterruptedException e) {}
      fr.setSize(310,210);
      try {Thread.sleep(700);} catch (InterruptedException e) {}
    }
  }
}



======================================================================

Comments
EVALUATION Name: osR10079 Date: 06/26/2001 I think this is a duplicate of 4102292 ###@###.### 26 Jun 2001 ======================================================================
11-06-2004