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

resize of frame , no change in getBounds()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.0
    • client-libs
    • sparc
    • solaris_2.5.1



      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)
      ======================================================================

            mbronsonsunw Mike Bronson (Inactive)
            dgrahamcsunw David Graham-cumming (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: