Is it possible to set a continuous layout for a jframe? I thought there was, but I'm not finding anything in the docs. JSplitPane allows it, but that's all I've found.
Printable View
Is it possible to set a continuous layout for a jframe? I thought there was, but I'm not finding anything in the docs. JSplitPane allows it, but that's all I've found.
Please explain what a JSpitPane is capable of that qualifies as "continuous layout" ?
when resizing a window, the contents resize to match continuously.
GridLayout & BorderLayout does that. The gridlayout gives each component the same space, for BorderLayout the resizing "favours" the component in the center and
the four others components are treated according to their preferredSize settings.
GridBagLayout also gives you resizing, with a some nitty gritty constraints coding.
I think maybe you're still misunderstanding, here's a picture.
example here
When resizing, the frame will match its size with how you draw the mouse, but the contents of that frame will not adjust until you release the mouse button from resizing it.
Ok, that requires one of two things....
1: a listener interface for the frame that is called continously during frame resizing
so that you can invoke a validate/repaint for the frame, providing that the frame will
accept that during resize.
2: a frame setting that will do that for free
I have failed in finding anything like this :confused:
guess i'll just have to use the listener, thanks for trying though.
If you go for option 1 then please let me know if you crack it.