Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Adding JComboBox to JTable header  RSS feed

 
Yasushi Okubo
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wouldl like to add JComboBox to JTable header so that a user can choose a different header name for each column in JTable. I tried to create a class extends JComboBox and implements TableCellRenderer, but it only showed the first entry, then does not show all other items ( I mean it does not extend a cell window to display others by clicking).

Could someone give me a direction ? It looks like the header in JTable cannot be treated like a regular cell. I would like to know how to get around this problem.

Thanks,
yasushi
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!