Hi, Go through following link, it might help you http://www.javabeginner.com/java-swing/java-jcombobox-class-example
Here JComboBox takes string array which we can build at run time in different ways. So fetch all the records and convert it in to String array and then pass it to the JComboBox. On Sat, Nov 6, 2010 at 8:58 AM, Freddy Castelblanco Macias < thelords...@gmail.com> wrote: > Hi people !!! > > Im working in Java with SQLJDBC and plain Files (secuencial, > Indexed ... etc). But ... I have to make a GUI and in one control of > Swing (JComboBox) I want to try to fill this control with information > that i have in my database or with information of my plain file. But i > want in one way:.... For example: > > //this is de actionPerformed of the jCombobox > //so when im evaluating the content on this control i want capture the > value and display in the GUI the information //of this VALUE.. > > 1 Coke > 2 Bread > 3 Lents > > The number is the value witch i want work and the words must be > displayed in the GUI > > SO how can i do that??? > > Help please !!!! > > Some told me one day, that this I can do whith a Collection, but > How ?? > > -- > To post to this group, send email to > javaprogrammingwithpassion@googlegroups.com > To unsubscribe from this group, send email to > javaprogrammingwithpassion+unsubscr...@googlegroups.com<javaprogrammingwithpassion%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/javaprogrammingwithpassion?hl=en -- With Regards, Shiv Shankar, Persistent System Ltd. -- To post to this group, send email to javaprogrammingwithpassion@googlegroups.com To unsubscribe from this group, send email to javaprogrammingwithpassion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en