Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old June 16th, 2005, 09:48 AM
ski_freak ski_freak is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Location: near Raleigh,NC
Posts: 4 ski_freak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 30 m 17 sec
Reputation Power: 0
Send a message via AIM to ski_freak
setSelectedItem

I am trying to set the item in a combo box from an Access db.

I did get the 'Object' from Access (shown in NetBeans debugger) but when I do a setSelectedItem it does nothing.

I do have a null value in my combo box list.

Here is the code fragments:

cboType.setEditable(true);
cboType.setFont(new java.awt.Font("MS Sans Serif", 0, 10));
cboType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "", "List", "Visual Basic Code", "Lotus Notes Code", "Java Code" }));
.
.
.
// name returns 'List'
Object name = resultset.getString("TYPE");

// displays the null value in the combo box
cboType.setSelectedItem(name);

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > setSelectedItem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT