Questions tagged [treecellrenderer]

TreeCellRenderer is a Java Swing interface that defines the method required by any object that would like to be a renderer for cells in a JTable.

TreeCellRenderer is a Java Swing interface that defines the method required by any object that would like to be a renderer for cells in a JTable.

The interface defines only one method, getTreeCellRendererComponent, that takes the value to be rendered and various additional information (selected, focused, is a leaf, etc). The method must return an instance of Component that is positioned at the tree cell location, later calling paint() on it. It is not uncommon to derive the renderer itself from a component and return this.

51 questions
0
votes
1 answer

Swing JTree how custom Render get value from custom Editor?

I try to make JTree with custom TreeRenderer public class TextCellRender implements TreeCellRenderer { JPanel panel; JTextArea text; JLabel label; LayoutManager Layout; public TextCellRender() { text = new JTextArea(); …
user1722669
  • 488
  • 2
  • 6
  • 22
0
votes
2 answers

DefaultTreeCellRenderer not working as expected

I'm being crazy because I don't understand what I'm doing wrong. I need that each node of my Tree have a different icon as if it is correct, incorrect or needs updating. I saw the Oracle Documentation and a lot of webpages (including Stackoverflow)…
chiri4
  • 43
  • 8
0
votes
1 answer

jtable in jtree with different row count

I'm trying to create a JTree that consists of JTables. So far, i succeeded in creating a Jtree with Jtables.But, I cant change the row count of a table of a specific tree node. Whenever i try to adjust the row count, all of the tree's node's row…
age
  • 1
  • 1
0
votes
1 answer

GTK CellRendererCombo set value into appropriate cell

What I'm trying to do it a TreeView that have several columns. The first column is a ComboBox, which means that I use Gtk.CellRendererCombo. The thing is, when I selected a value from the ComboBox, I'd like the Text from the cell to change from ""…
HexaGridBrain
  • 522
  • 7
  • 24
0
votes
1 answer

Is it possible to customize a JTree Node?

I want to try to implement a tree like this: Each node of the tree is a self defined component,which is composed of a JComboBox and a JTextField. Each time I select an item in the JComboBox, this node will generate three new sub nodes as leaves. Is…
faz
  • 313
  • 5
  • 12
-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
4