Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTree Display problem

Bonagiri UmaMaheshwar Rao
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using JTree to display my project structure. But Tree nodes are not displayed fully. It is displyaying partially. I need to explicitly double click on each node to display its name fully. This is happening to its child nodes also. The code i have is as follows.

The sample code in init method is as follows.

public void init()
JTree gclsTree = getTree();
JScrollpane gclsTreeView = new JScrollPane(gclsTree);
getContentPane().add(gclsTreeView, BorderLayout.CENTER);

I am adding my tree to the ScrollPane and adding it to the ContentPane of the applet. How to display full name of the TreeNode.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic