-
Bug
-
Resolution: Unresolved
-
P3
-
6
-
other
-
solaris
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);
}
}
}
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);
}
}
}