Creating a new GUI in Java (1.8) Swing, I am searching for a way to override resize behavior of all my components.
Let me explain to you with some edited photos:
1. Full Screen GUI
This is my full screen GUI, with 3 panels and a JToolBar
. The green one needs to have a fixed size, the others would be resizable.
Currently, I only have 2 small GridLayout
to organize them (one vertical, and one horizontal for green and cyan panels).
2. Small horizontal resize
If I, for example, reduce the frame size from the right side, I want my blue and cyan panel to be resized according to the new frame size. But the green panel must be fixed. (Not the most difficult part I think.)
3. Minimum horizontal size
This is the most difficult part for me. As soon as the cyan (or blue) panel reach is minimum size, I want him to "push" the green panel to the left, even if it disappears off the frame.
Of course, pulling the frame to the right will make the green panel appear again.
How could I do it?
I thought of using JSplitPane
or a specific listener to manually decide the resize behavior but I need some advice.
Sorry if an existing post can answer this, I didn't find any answer explaining the issue for me.
Thanks in advance!
If you want more examples, look at the "Evernote" software which acts the same way