Java – why does the method “setmaximumsize” not work, although “setminimumsize”?

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
分享
二维码
< <上一篇
下一篇>>