aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "please help" Watch "please help" New topic
Author

please help

catherine matthews
Ranch Hand

Joined: Jan 22, 2006
Posts: 78
My problem is that,
i have a tabbed pane, within that have several nested panes...
I need to add a scroll pane to one of the nested panes... I tried this way but not working... please help...


i still do not see any scroll pane... whre is my mistake please help
shansi raj
Greenhorn

Joined: Jul 05, 2006
Posts: 25
Try doing this

tabpan = new javax.swing.JTabbedPane();
tabpan2 = new javax.swing.JTabbedPane();
panCoupling = new javax.swing.JPanel();
scrollPane = new javax.swing.JScrollPane();
textArea = new javax.swing.JTextArea();

setLayout(new java.awt.BorderLayout());

scrollPane.setPreferredSize(new java.awt.Dimension(200, 200));
scrollPane.setViewportView(textArea);

panCoupling.add(scrollPane);

tabpan2.addTab("CBO", panCoupling);

tabpan.addTab("tab1", tabpan2);

add(tabpan, java.awt.BorderLayout.CENTER);
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: please help