I have two Swing components: JDialog -> JPanel
I want to fill all space in the JDialog with the JPanel. Default settings work fine. I can change size of the dialog and size of JPanel is changed correctly.
But when I click "maximize" icon then inner JPanel is freezed until window will be maximized.
OS X version 10;
Java version 1.7.
Code example:
final JDialog dialog = new JDialog(mainFrame, true);
dialog.setSize(new Dimension(800, 600));
dialog.setLocationRelativeTo(null);
final JPanel panel = new JPanel();
panel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 14));
dialog.add(panel);
dialog.show();
Does exist a way to fix this behavior?