Forums Register Login

JTree CellEditor with Combobox and Textfield

+Pie Number of slices to send: Send
Is it possible to create a TreeCellEditor with more than one component ( Jcombobox and JTextfield).
I need to create a TreeNode with JCombobox and JTextfield.
Thanks for your help.
+Pie Number of slices to send: Send
use an editable JComboBox. You will most probably have to write your own ComboBoxModel to handle the data the best way. See the sun tutorial on combo boxes, and the API doc of JComboBox.
chantal
+Pie Number of slices to send: Send
Thanks for your reply.
On a TreeNode, I need to create one JCombobox and 2 JTextFields.
I created my own TreeCellRenderer and added a JPanel which has these three compoenents.
Though I am able to paint the components, the components are not editable.
I am wondering how to implement a TreeCellEditor to accomodate these three components.
Sri
+Pie Number of slices to send: Send
hi,
I have implemented a JPanel as TableCellRenderer not as TreeCellRenderer, but I think it works similar (it should, anyway). I got the code from this site:
http://www.codeguru.com/java/articles/162.shtml
the trick is to delegate the mouse events through to the JPanel.
regards
Chantal
a wee bit from the empire
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 3630 times.
Similar Threads
design the Java swing with dynamic creation of JTextfield,JLabel,Jcombobox
Displaying possible (user intended) Strings as suggestions in a JList
drop down menu
JPopUPmenu Problem of PopUp scroll
Database constant visibility
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 20:29:17.