Questions tagged [jtree]

Java Swing component that displays a set of hierarchical data as an outline.

JTree is a class in the javax.swing package. It is a Swing component that displays a set of hierarchical data as a tree outline. Like most Swing components, it has a model, is highly configurable through the use of renderers, and fires events that can be handled.

Resources

1222 questions
-2
votes
1 answer

How to make a JTree node auto-expand when it is selected?

Basically I want the tree node's select event to behave like the expand event. How could I do this?
Leajon
  • 209
  • 1
  • 4
  • 9
-3
votes
1 answer

how find new node selected in jtree?

how find new node selected in jtree? or understand selected node changed?
Amir
  • 1,919
  • 8
  • 53
  • 105
-3
votes
1 answer

I have a JTree and I want to apply renderer so that I can modify the display name for the nodes of the JTree

So that nodes have internally different name but shows other name, that would be easy for me to apply searching constraints on original name, but display modified name. treePanel = new JUResourceTypeTreeStructurePanel (I18N_ID, "menu.title",…
Harshit Saklecha
  • 100
  • 1
  • 10
-3
votes
1 answer

Set Imageicon for JTree node

I created a JTree. I need to change icon for specific node. Able to setIcon for closed and open as well as leafnodes but I need to set icon for specified node in my JTree. Please shed some light on this.
krish131
  • 163
  • 3
  • 14
-4
votes
1 answer

Can't get Object string value; need to convert to String to compare

I want to check if the value does exist or not in Tree when trying to add node from Tree. The value does not match in the case that I got Object instead of String. Here is the action code for calling existsInTable() try { …
-4
votes
1 answer

JTree: how to get the text of one leaf?

I want to get text of an JTree in format: Root Node1 leaf1 leaf2 <------- click Node2 when I click on the leaf leaves me information in a JPanel
-4
votes
1 answer

Tree node icon dissappears when i click on it

/* when i am clicking the tree node (EX:WEBLOGIC is selected) the node icon disappears,but the other icons(Non selected) are coming.please help me out to solve this issue.This is a swing based program*/ class ColorRenderer extends…
Rabi
  • 15
  • 3
1 2 3
81
82