Alex Rivera | Logout

How do I disable a JPanel so that it can't change size in Java

Asked 2012-04-14T20:47:27.003
8

I have several JPanels in a layout and whenever I change the size of the JFrame manually with my mouse, it stretches the JPanels and makes it look messy. Is there a way to disable this?

Edit
Report

1 Answer

10

JPanel is not resizable by the user.

If you are referring to JFrame, you can use

yourFrame.setResizable(false);
answered 2012-04-14T20:59:23.130

Your Answer