1,217 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
52
views
how to give background color to the Jtree , DefaultTreeCellRenderer using java swing
I have a created a following renderer which renders the JTree with icon and folder list.
I want to add different color to the background of that section. i tried giving it to panel but the Jtree is ...
1
vote
0
answers
74
views
How can I change the text color to certain elements of JTree but not to the whole tree?
I know that I can change the text color using:
import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
import java.awt.*;
public class ...
0
votes
1
answer
51
views
create JTree to nth level
It might be simple but I am stuck with it from last few hours that I need to create the JTree to nth level as per database records.
The below code add the childs till level 1, I don't know how can i ...
1
vote
1
answer
158
views
JTree Default icons not removed with Root Icon
I am aware that there are relevant materials exists on google about JTree icons change, but still I am unable to sort out my simple requirements.
I need to change the icon of Root element of JTree ...
0
votes
1
answer
106
views
Issue with Swing JTree Checkbox Behavior
Facing this issue with my code while working with checkboxes in a JTree. The root node is treated as a "Named Vector" in first iteration instead of a "CheckBoxNode"As a result, it ...
0
votes
0
answers
35
views
JTree. Wrong gui update order
I have JTree. Child nodes are loaded dynamically when the parent node is expanded (treeExpanded event). Their loading time is a few seconds. I want to display the message "Wait" in the ...
-1
votes
2
answers
122
views
Java Swing's JTree uses node's hashcode - why?
It seems JTree has a -for me- unexpected behavior: it relies on the hashcode of the nodes instead of relying on its model. This deviates from the way e.g. JTable and JList work: these two allow you to ...
2
votes
0
answers
57
views
update JTree nodes with a full TreeNode hierarchy instead of update
I have a JTree that I want to update its node based on a list that I have receiving from remote (some of its data is already in Tree ,so they are some repeatations)
Here is my data model that comes ...
-1
votes
1
answer
81
views
Trying to use standard JTree implementation, but the output is really messed up
I'm trying to use JTree. Here is my example test class:
package inspector;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.util.ArrayList;
import java.util....
0
votes
0
answers
85
views
How do I refresh/update the Custom fileTree Swing component by itself during file changes?
I found this Custom fileTree Component from github to implement it into my project, I'm using this JTree component to access and display file information like file name, file path, file type in a ...
-1
votes
1
answer
68
views
How to change background color of a jtree node
I am having a netbeans project with jtree and DefaultMutableTreeNode. I have to search a node in the tree by its name and want to highlight it, for highlighting I think I will change the background ...
0
votes
0
answers
30
views
how to add Folder directory or files in a folder to JTree of my code, before answering check the code that I written [duplicate]
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;...
0
votes
2
answers
93
views
Implementing JTree where the DefaultMutableTreeNode is read from xml file
Is it possible to create at JTree without hardcoding every tree node but rather reading in from a xml file and getting the same output as following code will give:
import javax.swing.JFrame;
import ...
-2
votes
1
answer
352
views
class cannot be cast to class javax.swing.tree.DefaultTreeCellRenderer error
public class jtre extends javax.swing.JFrame {
static{
try{
UIManager.setLookAndFeel(NimbusLookAndFeel.class.getName());
}catch (ClassNotFoundException ex){
...
1
vote
1
answer
178
views
Java : JTree and BasicTreeUI reference doesn't show scrollbars
Working with the JTreeWithScrollbar example, but scaled it back significantly to focus on the issue.
The original code would have the vertical scrollbars appear as needed.
Here, there is plenty of ...