Swing Example : Make Frame Non-Resizable

How to Make Frame Non-Resizable




import javax.swing.*;
public class SwingFrameNonResizable{
public static void main(String[] args){

JFrame frame = new JFrame("Non Resizable Frame Example");

frame.setResizable(false);

frame.setSize(500, 500);

frame.setVisible(true);


frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

}

}


0 comments: