This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTree and JScrollPane

 
Shalini Chandel
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Craig Wood
Ranch Hand
Pie
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic