Results 1 to 3 of 3
  1. #1
    Stephen Douglas's Avatar
    Stephen Douglas is offline Senior Member
    Join Date
    Mar 2010
    Posts
    137
    Rep Power
    0

    Default Adding JComboBox type column to the JTable ??

    Hey Guys... I need to fetch user input from a JTable from a set of predefined values... I wondered if there is any way that we can add a column to the JTable which is similar to the JComboBox...

    Please suggest !.thnx:)
    The Quieter you become the more you are able to hear !

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    You probably want to use a JComboBox as a cell editor (but probably not as a renderer). Please check out the JTable tutorial as it describes how to do just this.: How to Use Tables (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)

    Much luck.

  3. #3
    Stephen Douglas's Avatar
    Stephen Douglas is offline Senior Member
    Join Date
    Mar 2010
    Posts
    137
    Rep Power
    0

    Default

    thnx for the link. :)
    The Quieter you become the more you are able to hear !

Similar Threads

  1. split a jtable column
    By anilkumar_vist in forum Advanced Java
    Replies: 0
    Last Post: 12-14-2009, 11:29 AM
  2. Not trigger Action when adding to JComboBox
    By ribbs2521 in forum New To Java
    Replies: 4
    Last Post: 10-22-2009, 06:19 PM
  3. JCheckBox in JTable column
    By hind in forum New To Java
    Replies: 8
    Last Post: 01-04-2009, 08:40 PM
  4. How to sort column in JTable
    By johnt in forum AWT / Swing
    Replies: 3
    Last Post: 06-14-2008, 06:48 AM
  5. Adding items to a jComboBox
    By tronovan in forum New To Java
    Replies: 0
    Last Post: 08-08-2007, 09:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •