10 Topics

Member Avatar for
Member Avatar for srikanth2321

Hi, I have a problem of modifying Jtree font. No matter what I do or make changes in code I'm unable to change the default font. I got the TreeCellRenderer code from some website. Any suggesion on font change would be really helpful class MyCellRenderer extends JEditorPane implements TreeCellRenderer { …

Member Avatar for mKorbel
0
853
Member Avatar for genevish

I created a JTree from an XML file like this: //Load Tree from XML file File stocks = new File("//Users/scott/Desktop/saSample.xml"); DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); doc = dBuilder.parse(stocks); doc.getDocumentElement().normalize(); // Set root folder DefaultMutableTreeNode rootnode = new DefaultMutableTreeNode(doc.getDocumentElement().getAttribute("saName")); DefaultTreeModel treeModel = new DefaultTreeModel(rootnode); objMgrTree.setModel(treeModel); // Set Pages …

0
95
Member Avatar for Aditya.gtbit

Please help me...How to connect a jfilechooser and a jtree that takes the file system view of my pc..i need whenever a node is selected in jtree it automatically set as a current directory in the jfilechooser..

Member Avatar for BestJewSinceJC
0
562
Member Avatar for Mr.BunyRabit

Hey there, is there a way to convert a string to a tree path? i can convert a path to a string, but not the other way around... [CODE]jTree1.getSelectionPath().toString()[/CODE] thats the only way i know.. nooo idea how to convert it back??

Member Avatar for Mr.BunyRabit
0
846
Member Avatar for warlord902

I want to make node heights of JTree nodes to differ. I mean like the parents have different node height and childs have different node height. I tried to put myJTree.setRowHeight(30) while adding nodes but it doesn't work because it does not work for a single node but for the …

Member Avatar for mKorbel
1
928
Member Avatar for warlord902

I am facing a strange problem, and seriously I spend lot of time in experimenting different things to get it work but all in vain. I have a JTree whose nodes are been modified by my custom TreeCellRenderer class. My class creates a JPanel for every node and places components …

Member Avatar for warlord902
0
155
Member Avatar for warlord902
Member Avatar for warlord902
0
1K
Member Avatar for Chaster

Hi all, I have a JTree (JXTreeTable actually, but anyway, it should be similar). I use setShowsRootHandles(true), but the handles are not displayed. Do you know what may cause the problem? My current look and feel settings support these kinds of things. Thanks in advance.

0
66
Member Avatar for Chaster

Hi all, I've been struggling with a Swing issue for days now, maybe someone can help me :) I would like to see several icons at the left hand side of a JTree element. Is that possible? I mean i know that I have to create some tricky cell renderer …

Member Avatar for Ezzaral
0
87
Member Avatar for localp

i need to a Scroll bar or JScrollPane to My Jtree... I have googled and gone through several examples, but non seemed to have worked... Please can some one help me to solve this problem .. I simply need to have scrollers when the content of the JTree increases .. …

Member Avatar for localp
0
3K

The End.