Java Swing How to - Call JFrame setResizable()








Question

We would like to know how to call JFrame setResizable().

Answer

import javax.swing.JFrame;
//from ww w .  j  a v a 2s. c  om
public class Main extends JFrame {
  public Main() {
    setResizable(false);
    pack();
  }

  static public void main(String[] args) {
    new Main().setVisible(true);
  }
}