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

getMaximumsize() size of the frame less than the minimumsize of Frame.

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      other
    • OS:
      solaris

      Description

      1. Create a Frame.
      2. setMaximumSize(200,200)
      3. after some delay,setMinimumSize(600,600) which is more than maximumsize of the frame.
      NOTE: now the frame size changes to 600,600 even though the maximumSize is set to 200,200
      4. calling frame.getMaximumsize() returns 200,200
         when the minimumsize of the Frame itself 600,600


      Execute the following code to reproduce the defect. reproducible in most of the platforms,

      import java.awt.*;
      import java.net.URL;

      public class FrameSizeTest {
          public static void main (String argv[]) {
            try {
                Frame f =new Frame ("hello");
                f.setLayout(new FlowLayout());
                TextArea ta = new TextArea();
                ta.setBackground(Color.BLUE);
                f.add(ta);
                f.setMaximumSize(new Dimension(200,200));
                f.setVisible(true);
                
                   Thread.sleep(5000);
                   f.setMinimumSize(new Dimension(600,600));
      Thread.sleep(5000);
                   System.out.println(f.getMaximumSize());
              }
            
              catch(Exception e) {
                  System.exit(1);
              }

          }
      }

        Attachments

          Activity

            People

            Assignee:
            arapte Ambarish Rapte
            Reporter:
            ggirishsunw Girish Girish (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Imported:
              Indexed: