• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to dynamically add arrow button with pop up in the cell of JTable  RSS feed

 
Samir Bhagwat
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have a requirement which is as follows:
I want to display some data in the row of JTable. Now when the focus goes to any column of the JTable it should show a arrow button and pop-up should come on clicking on it(ComboBox functionality).
Can this be easily achievable using swing?
Any suggestion on this would be very helpful.
Thanks,
Samir
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're going to have to make a TableCellRenderer and TableCellEditor from JComboBoxes. Here's some sample code I whipped up that does this:



-Nate
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!