This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes How to put JTable and JTree in a JCombo Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to put JTable and JTree in a JCombo" Watch "How to put JTable and JTree in a JCombo" New topic
Author

How to put JTable and JTree in a JCombo

Ravi Gupta
Greenhorn

Joined: May 16, 2001
Posts: 12
How can i put a Jtree or a JTable in Jcombo. There are many examples to put JCombo in a JTable but i couldn't find any example on JTable in JCombo.
Aleksey Matiychenko
Ranch Hand

Joined: Apr 03, 2001
Posts: 178
I am curious of what would be an application of that?
Ravi Gupta
Greenhorn

Joined: May 16, 2001
Posts: 12
This is a requirement from the client. They have an application developed in IFC. All the components in that application is customized and we have to convert those using Swings.
Originally posted by Aleksey Matiychenko:
I am curious of what would be an application of that?

Aleksey Matiychenko
Ranch Hand

Joined: Apr 03, 2001
Posts: 178
There is an interface called ListCellRenderer that has a method that returns a Component object. If you implement it and then use setRenderer method of the JComboBox you will get the desired behavior.
I tried it last night and it seems to work.
 
Don't get me started about those stupid light bulbs.
 
subject: How to put JTable and JTree in a JCombo
 
Similar Threads
JTree & JTable
jcombo box and jtable
JTable or JTree in a JCombo
JCombo Box And JTable
JCombo box inside a JTable Cell?