Results 1 to 3 of 3
Thread: combobox
- 07-02-2008, 12:10 PM #1
Member
- Join Date
- Apr 2008
- Posts
- 4
- Rep Power
- 0
- 07-02-2008, 01:56 PM #2
Suggestion: Read the doc about combobox, search for examples of how to code it, write some code to use it and then come back here when you have problems.
- 07-02-2008, 08:36 PM #3
Java Code:String[] items = { "Login", "Logout" ... }; String[] urls = { "urlOne", "urlTwo" ... }; JComboBox combo = new JComboBox(items); combo.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { int index = ((JComboBox)e.getSource()).getSelectedIndex(); String urlStr = urls[index]; // carry on
Similar Threads
-
ComboBox Fix Width
By Azndaddy in forum New To JavaReplies: 2Last Post: 05-29-2008, 04:23 AM -
Add data to combobox in page load
By hussainzim in forum JavaServer Pages (JSP) and JSTLReplies: 5Last Post: 05-15-2008, 12:57 PM -
[SOLVED] Adding ComboBox
By impact in forum New To JavaReplies: 2Last Post: 05-02-2008, 08:43 PM -
HashMap and ComboBox
By banie in forum AWT / SwingReplies: 2Last Post: 03-25-2008, 11:58 PM -
ComboBox with database options
By Goldy in forum Advanced JavaReplies: 0Last Post: 12-01-2007, 09:43 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks