Thursday, January 19, 2012

How can I set the minimum size of a Window/Frame?

Derived from A question posed by David Jones Topics Java:API:AWT:Widgets Author Sandip Chitale Answer Subclass and override -
public Dimension getMinimumSize() {
  return new Dimension(
    MINIMUM_WIDTH, MINIMUM_HEIGHT);
}
Note that the native implementation of Frame does not allow minimum size below certain size.