Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: How to use multi select combo box in swings?

  1. #1
    Junior Member
    Join Date
    Nov 2012
    Posts
    7
    My Mood
    Cool
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to use multi select combo box in swings?

    Hi,

    I want to use multi select combobox in my swing application.. because i want to select mulltiple options and i want to print those options separated by comma symbol.. can any tell me how to use it..


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: How to use multi select combo box in swings?

    Which part of this are you having trouble with?

    I believe what you are looking for is a JList, not a JComboBox.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Junior Member
    Join Date
    Nov 2012
    Posts
    7
    My Mood
    Cool
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: How to use multi select combo box in swings?

    Thanks Kevin...

    yah. but in my form i have multiple components. in that i want to select multiple options from a list and i want to add it to textbox after that i want to invisible list box at run time.. but at run if i place any list box already placed components places will be change.. and also after selection if i want to invisible that list box then again i want to change my components places..

  4. #4
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    Posts
    1,130
    My Mood
    Cynical
    Thanks
    64
    Thanked 140 Times in 135 Posts

    Default Re: How to use multi select combo box in swings?

    Quote Originally Posted by KevinWorkman View Post
    Which part of this are you having trouble with?

    I believe what you are looking for is a JList, not a JComboBox.
    Kevin, looks like he's already been told this before, but doesn't seem to believe us.

    @original poster: so pop up your JList in a JDialog if need be. But again, you shouldn't use a JComboBox for this, no matter how many forums you try to ask this question in.

  5. The Following User Says Thank You to curmudgeon For This Useful Post:

    KevinWorkman (November 6th, 2012)

  6. #5
    Junior Member
    Join Date
    Nov 2012
    Posts
    7
    My Mood
    Cool
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: How to use multi select combo box in swings?

    Thanks curmudgeon...

    could you please tell me how to use popup for my list box at required position..

    Thanks in advance...

Similar Threads

  1. Creating select box dynamically- onchange fired before selection
    By Veronica in forum Other Programming Languages
    Replies: 1
    Last Post: July 31st, 2012, 10:59 PM
  2. HELP WITH COMBO!
    By bajeanius in forum AWT / Java Swing
    Replies: 10
    Last Post: July 25th, 2012, 08:03 AM
  3. ClassCastException with Enum Combo Box
    By Diplo in forum What's Wrong With My Code?
    Replies: 4
    Last Post: July 26th, 2011, 01:22 PM
  4. Adding another related combo box ?
    By shad3d in forum What's Wrong With My Code?
    Replies: 1
    Last Post: May 19th, 2011, 01:53 PM
  5. Loading contents of a Database into a Combo box
    By tyolu in forum JDBC & Databases
    Replies: 3
    Last Post: June 22nd, 2009, 08:14 AM