This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JTree and JScrollPane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTree and JScrollPane" Watch "JTree and JScrollPane" New topic
Author

JTree and JScrollPane

Shalini Chandel
Ranch Hand

Joined: May 05, 2005
Posts: 115
Hi all,

I am using JScrollPane as Horizontal Split. I used JTree in Left pane. I have 2 JApplet files with Swing components on it (Forms to take user input)

JTree has structure as follows:

Settings
Server
Client

Environment
Server
Client

When I click SERVER, i want to display my server applet in right pane.
I wrote code as follows for event handling:


pa is a Panel i added to right pane and InstallDemo and CompanyInfoo are 2 applet classes.

It displaying the node selected but its not displaying the applet.
Please help...


SCJP 1.4
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535

Also, you might try checking the preferred size of the incoming component. If it was designed to be placed in an expanding–type layout, such as the Center section of a BorderLayout, you may need to use a different layout manager and/or provide size hints.
 
jQuery in Action, 2nd edition
 
subject: JTree and JScrollPane
 
Similar Threads
JTree - expanding nodes
Checkbox with Jtree
XML to DOM to JTree
Subtree in JTree
how to fill the jtree with the last modified value ?