I have a JFrame whose contents consist of alot of JLabels that can either be text or images or both. The user can also change the font for these (all fonts will be the same size). My problem is how do I resize to ensure the JFrame to ensure all the contents are visible? All the contents are data driven. I'm using JDK 6_13 on Windows machine.
I was about to post new thread while I got this..
I am trying a quiz application with swings, so while showing the question,
I wanted to display the question through a Label. (I specifically wanted Label because I am using JDesktopPane with Nimbus background and I like to show it off.. so if i use textarea or textpane, it'll show as white and wouldn't be as good as label..)
So while trying to fit the question inside label, I learn't how to use multiline using html tags..
Problem is that whenever the label would go out of screen size, I couldn't get the desktoppane to scroll to that area, even if the desktop pane was inside a scrollpane.
after i saw your post here, i used pack() after resizing the desktop pane, and it Worked!!.. thanks a lot, and any comments on what i am trying to achieve is welcome..