I have tried to create an exception that throws up dialogue box and stop the user from resizing a jframe any smaller than (250, 350) but I have had no luck in doing so.
So my question is, if I have a Jframe pane with the set size of 800, 500. Can I create an exception that when the user tries to make the jframe smaller than a certain size, it stops them at that size and shows a error message?
Don’t create an exception. Create an action Listener that throws an Error Message in the form of a JOptionPane Dialog Box when the user resizes the window to any size smaller than (250, 350)
Here is the running Code for you, Enjoy !