• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Letting a JFrame choose it's own size ?

boran

Golden Member
Hi, I'm making a project for school andI work with a lot of sub-panels and buttons, etc, the problem now is that the amount of buttons and subpanels is not a fixed amount, nor is their size. so now i'd like to know if it is possible to have a JFrame (or JPanel) choose it's size on it's own, so that everything fits innit, without 3 pixel emptieness around it or something like that.

I know i could sort of do this with functions, and check each elements size requirements, but these vary from OS to OS and from time to time, and this would thus be a very hard to figure out function.
 
yes, on the java developer forums they suggested the same thing, and it's just what I need.
thanks.
 
Back
Top