This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have written a swing application using a JFrame and now realise it should have been in full screen mode. But resizing it now is going to cause all the components to go haywire... is there any way I can use full screen maintaining my current proportions?
Why do you want to make a full-screen-mode application resizable? Doesnt make sense. Also it is a bad usability design.
I would recommend the following: 1) Launch in full screen mode (Default) 2) Provide the user with an option of toggling between full screen and non full screen mode. 3) Once the user enters the non full screen mode, s/he can always resize the window.
I think that applications should resize well whether you plan to use them in full screen mode or in a resizeable frame - then you won't run into problems when you decide to switch between the two - or when users with different screen sizes/resolutions use your application.
GridBagLayout can do this - but make sure you are using use weightx, weighty, and fill - these tell GridBagLayout how to distribute "extra" space in the layout.
Joined: Aug 02, 2006
It's not about resizing....I had coded the application to run in a smaller screen....now if I set it to large full screen..everything goes haywire....e.g. I had just two rows..now 2 rows take up the whole screen...and it just looks plain bad. Thanks so much for your help
So next, I open my frame, and I resize it to occupy the full screen(I am not yet using the Java APIs to set full screen mode). I find that my components have gone awry, that is the size and orientation that I had in my un-resized window is not maintained. Any pointers? Would be much appreciated. Thanks