Results 1 to 3 of 3
  1. #1
    asai is offline Senior Member
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    115
    Rep Power
    0

    Default Fill jCombo with data from table

    Hi,

    I am trying to use a jCombo in my application. I have succeded with this, but not the way I would like.

    When I open the combo, I would like the content to be shown as a table, with obviously the content from a SQL table.
    Now I only gets one column from the table, and this is the one that I after selecting it gets as input in a new table.

    Example: I have a ordertable. In this ordertable I have a combobox to open a customertable and I would like to see the customer id and the customer name, but only the id is used into the order table.
    And also when opening a old order, the customer id is put into the combo from the ordertable.

    Any suggestions and/or examples on how to accomplish these tasks?

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is online now Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,963
    Rep Power
    8

    Default Re: Fill jCombo with data from table

    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    asai is offline Senior Member
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    115
    Rep Power
    0

    Default Re: Fill jCombo with data from table

    Thanks. I will have a look. :)

Similar Threads

  1. Fill JTree with data
    By frednic in forum New To Java
    Replies: 3
    Last Post: 11-23-2010, 08:23 PM
  2. fill table with cells
    By BigBear in forum AWT / Swing
    Replies: 3
    Last Post: 01-26-2010, 09:22 PM
  3. What do you use for saving data from table?
    By ocean in forum New To Java
    Replies: 1
    Last Post: 11-21-2009, 07:08 PM
  4. Replies: 0
    Last Post: 03-31-2009, 04:52 PM
  5. Jsf, Filtering Data In A Table
    By Freddie in forum JavaServer Faces (JSF)
    Replies: 2
    Last Post: 05-11-2007, 12:59 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
  •