Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

resizable scrollpane

Status
Not open for further replies.

Dijkstra30

Programmer
Oct 24, 2005
13
0
0
RO
Hello there!

I have a tabbedPane. Each tab contains a scrollPane.
Each scrollPane has variable sized editors.
If i set the scrollPane to a smaller preferred size it's not ok for the longer editors:a scroll bar appears even if there is enough space below for the entire editor.
If i set it bigger, the smaller editors show a scrollbar of cuorse, that i don't need.
If i don't set it at all, the editors display just a small stripe at first, but when i change the tab and come back to the editor, it looks ok. How can I make it look ok from the begining?
Setting the minimum size doesn't work.

So, how can I set the dimension of scrollPane to match the size of the editor as the editor changes?
 
If i don't set it at all, the editors display just a small stripe at first, but when i change the tab and come back to the editor, it looks ok. How can I make it look ok from the begining?

Maybe call revalidate() on the container. Don't know if this will work; it's off the top of my head.

Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top