Results 1 to 5 of 5
  1. #1
    hassaanid2012 is offline Member
    Join Date
    Apr 2012
    Location
    Pakistan
    Posts
    20
    Rep Power
    0

    Default JTables and JCombobox!!!

    Hello Guys!!!

    I have 2 JTables (students & projects) and one JComboBox. I have some data in students JTable and i also have some data in projects JTable. students JTable have 5 columns and projects JTable have 4 columns. I also have 3 JTextFields. I successfully able to show data on JTextFields when click on projects JTable row but students JTable have one column named as "RollNumber" that i want to display its contents on JComboBox also. I know this problem is confusing but students JTable has column "RollNumber" and i also wants to show its contents to JComboBox when projects JTable row is clicked. Now this scenario is confusing but i want the solution. 2 JTables, 1 JComboBox & 3 JTextFields. I completed the JTextFields part now give me proper solution for other part. Waiting for your response(s). Thanks in Advance Experts!!! :)

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

    Default Re: JTables and JCombobox!!!

    I've moved this thread to the Swing forum.

    I'm really not sure what your actual question is. You've stated some demands, but you haven't actually told us what you've tried or where you're stuck. Where's your SSCCE?
    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
    hassaanid2012 is offline Member
    Join Date
    Apr 2012
    Location
    Pakistan
    Posts
    20
    Rep Power
    0

    Default JTable to JComboBox!!!

    Hello Guys!!!

    I have one JTable and one JComboBox. I want to show all values of specific column inside JComboBox without using SQL queries. I tried to write function in JComboBox Popup visible event with SQL query i retrieved all values but SQL query executed every time when pop up visible so that creates problem. That's why i ask you guys to tell me how can i retrieve all values of specific column to JComboBox without using SQL? Thanks!!!

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,193
    Rep Power
    19

    Default Re: JTable to JComboBox!!!

    Since this appears at least partly related to your earlier thread, where you didn't bother to reply to Kevin's response, I'm merging the two threads.

    Oh, and where's your SSCCE?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,193
    Rep Power
    19

    Default Re: JTables and JCombobox!!!

    Threads merged.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. JLists and JTables
    By loopsnhoops in forum New To Java
    Replies: 2
    Last Post: 05-27-2011, 01:19 AM
  2. Comboboxes and JTables
    By Hugo in forum AWT / Swing
    Replies: 4
    Last Post: 04-24-2011, 06:50 PM
  3. Jtables
    By amiral.smith in forum AWT / Swing
    Replies: 1
    Last Post: 01-28-2011, 03:22 PM
  4. JTables and Databases
    By sehudson in forum Advanced Java
    Replies: 8
    Last Post: 03-25-2010, 09:01 AM
  5. Replies: 2
    Last Post: 12-10-2009, 01:58 PM

Posting Permissions

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