I am creating a GUI that contains several Graphics2D ellipses and drawStrings. I have been experimenting with different methods of dynamic resizing and had no luck. I really want the objects to scale with the JFrame as it is resized. If it gets smaller I want to make the objects smaller and closer together and vice versa is the JFrame is made larger.
I have tried all of the different layout managers and even overloading the paint and paintComponent methods in different ways. I can't figure out how to get the variables that dictate size to update with the window size. Here is a self-contained copy of my code that has been set back to a "working" state:
I have tried all of the different layout managers and even overloading the paint and paintComponent methods in different ways. I can't figure out how to get the variables that dictate size to update with the window size. Here is a self-contained copy of my code that has been set back to a "working" state: