JDK-4105470 : resize of frame , no change in getBounds()
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.2.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.5.1
  • CPU: sparc
  • Submitted: 1998-01-21
  • Updated: 1998-07-14
  • Resolved: 1998-07-14
Related Reports
Duplicate :  
Description

Name: dgC58589			Date: 01/21/98


Resizing a Frame with the mouse does not change the values returned by getBounds()

public class testFrame extends Frame
 {
  private int height=100,width=100;
  
  public testFrame() 
   {
    Rectangle loc;

    loc=getBounds();
    System.out.println("x="+loc.x+"  y="+loc.y+
                       "  width="+loc.width+"  height="+loc.height);
    setSize(width,height);
    show();
   }

  public void paint(Graphics g)
   {
    Rectangle loc;

    loc=getBounds();
    System.out.println("x="+loc.x+"  y="+loc.y+
                       "  width="+loc.width+"  height="+loc.height);


   }


  public static void main(String[] args)
   {
    testFrame frame= new testFrame();
   }
 }

When run with JDK1.1.5 Solaris this program results in changing values
when making the Frame window bigger. With the JDK1.2beta2, the values stay
at the initial value. Is this a bug , or a change in API behavior????
(Review ID: 23586)
======================================================================

Comments
WORK AROUND Name: dgC58589 Date: 01/21/98 None. ======================================================================
11-06-2004