Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to put JTable and JTree in a JCombo

 
Ravi Gupta
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am curious of what would be an application of that?
 
Ravi Gupta
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic