Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

please help

 
catherine matthews
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic