+ // JAL-1580: setMaximumSize() doesn't work, so just size for the worst case:
+ // check for null is for JUnit usage
+ final int windowHeight = Desktop.instance == null ? 540
+ : Desktop.instance.getHeight();
+ setPreferredSize(new Dimension(540, windowHeight));