Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-02-2008, 01:10 PM
Member
 
Join Date: Apr 2008
Posts: 4
chandu.v is on a distinguished road
combobox
I have a combobox in my frame.In that i have an options like
Introduction,
Login,
Logout.

I want to give the links to options in drop down list of the combobox using swings.

Please give me your valuable suggessions

Last edited by chandu.v : 07-02-2008 at 01:12 PM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-02-2008, 02:56 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: SW MO, USA
Posts: 1,473
Norm is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-02-2008, 09:36 PM
Senior Member
 
Join Date: Jul 2007
Posts: 1,189
hardwired is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ComboBox Fix Width Azndaddy New To Java 2 05-29-2008 05:23 AM
Add data to combobox in page load hussainzim JavaServer Pages (JSP) and JSTL 5 05-15-2008 01:57 PM
[SOLVED] Adding ComboBox impact New To Java 2 05-02-2008 09:43 PM
HashMap and ComboBox banie AWT / Swing 2 03-26-2008 12:58 AM
ComboBox with database options Goldy Advanced Java 0 12-01-2007 10:43 PM


All times are GMT +3. The time now is 02:48 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org