Java – why does the method “setmaximumsize” not work, although “setminimumsize”?
•
Java
import javax.swing.*;
import javax.swing.*;
import java.awt.*;
public class MyClass {
public static void main(String args[]) {
JFrame myFrame = new JFrame();
myFrame.setSize(new Dimension(500,500));
myFrame.setMinimumSize(new Dimension(300,300));
myFrame.setMaximumSize(new Dimension(800,800));
myFrame.setVisible(true);
myFrame.setDefaultCloSEOperation(JFrame.EXIT_ON_CLOSE);
}
}
Solution
This is an error: http://bugs.sun.com/view_bug.do?bug_id=6464548
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码
