JFrame.setMaximumSize() doing nothing?
843806Oct 26 2008 — edited Oct 26 2008I know this question has been posted many times, but I just can't find the answer...
So, how I set the max size of a frame?
A little test I made:
import java.awt.*;
import javax.swing.*;
class test
{
public static void main(String[] args)
{
JFrame test = new JFrame("test");
test.setMinimumSize(new Dimension(200,300)); // works
test.setMaximumSize(new Dimension(300,400)); // doesn't work
test.setDefaultCloseOperation(test.EXIT_ON_CLOSE);
test.show();
}
}
As you see, the result is that I cannot resize the frame under 200x300, but I'm able to resize it as large as I want, which is obviously wrong...
What am I missing?
Thanks in advance for the answers