• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

JComboBoxes in JTables

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there anyway to display a jcombobox in a jtable and still have it look exactly like a normal jcombobox.
The problem is my users won't know its a combobox if the arrow isn't there initially. Is there anyway to put an arrow there even if the user doesn't click on the box.
 
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The cell may not be wide enough to show the arrow. Try expanding the width of your column with your mouse (move the header divider) and see if the down arrow shows up. If not, you may need to write a TableCellRenderer to extend JComboBox.
 
Casen Densmore
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
DefaultTableModel supports JComboBox just not the way I wanted, you were right, I had to create a CustomTableCellRenderer in order to do the job...Thanks!
Casen
 
reply
    Bookmark Topic Watch Topic
  • New Topic