User changed window size in Java
Go to solution
Solved by fletch to 99,
If I'm understanding this right, you don't want the window to be resizable but you want to be able to use hardcoded sizes? Or were you looking for like a fullscreen option?
public void init() { this.setResizable(false); /* * Create your jframe */ } public void onSizeChange(JComboBox box) { switch (box.getSelectedIndex()) { case 0: this.setSize(100, 100); case 1: this.setSize(200, 200); } }

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now