开发者

Why doesn't the method "setMaximumSize" work although "setMinimumSize" does?

开发者 https://www.devze.com 2023-01-23 14:37 出处:网络
import javax.swing.*; import java.awt.*; public class MyClass { public static void main(String args[]) {
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.set开发者_C百科MinimumSize(new Dimension(300, 300));
       myFrame.setMaximumSize(new Dimension(800, 800));

       myFrame.setVisible(true);
       myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

   }

}


It's a bug: http://bugs.sun.com/view_bug.do?bug_id=6464548

0

精彩评论

暂无评论...
验证码 换一张
取 消