Relative Content

Tag Archive for javaswinglayout-manager

Best Java Swing layout manager for proportional panes, etc. heights

I want to keep the proportions for various JPane sizes upon resizing the window (e.g. 10% text box, 90% text pane, etc.) in order for complete consistency. I’ve been using JSplitPanes as a stopgap, but I’d like to move on from that as it’s inconvenient to change and goes crazy on the slightest resize. From what I understand, GridBag would be best. However, if I’m being honest, layout managers hurt my brain, so I’d like to confirm this before I sink an ungodly amount of hours trying to understand it. I’ve already spent a few hours and made no progress. I’ve attached an image to help. If you need any elaboration, please ask. Thank you in advance