It's not a secret anymore!
The moose likes Swing / AWT / SWT and the fly likes ScrollPane problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "ScrollPane problem" Watch "ScrollPane problem" New topic

ScrollPane problem

Anirban dutta
Ranch Hand

Joined: Aug 08, 2002
Posts: 89
Dear All,
I have a TabbedPane. In this tabbedpane I am adding a panel(it's contents are described below) at tab position 0. The contents of the panel are as follows :
A ScrollPane in which I have added a panel containing a Label and TextField with GridBagLayout. This scrollpane is added to the panel above which is added in the tabbed pane.
Now my problem is that the panel added to the scrollpane is not shown. But the ScrollPane itself is shown. I could not get the problem. If anyone can help me then I will be really grateful to him/her.
Thanks and regards
Joe Ess

Joined: Oct 29, 2001
Posts: 9191

Show us the code.

[How To Ask Questions On JavaRanch]
Anirban dutta
Ranch Hand

Joined: Aug 08, 2002
Posts: 89
Dear Joe,
Thank you for your concern. Actually I have solved the problem. The problem was that I was adding components to the scrollbar directly, instead of adding to the viewport.
I agree. Here's the link:
subject: ScrollPane problem
It's not a secret anymore!