aspose file tools
The moose likes JDBC and Relational Databases and the fly likes Display data from database into JComboBox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Display data from database into JComboBox" Watch "Display data from database into JComboBox" New topic
Author

Display data from database into JComboBox

chiatai goh
Greenhorn

Joined: Mar 19, 2005
Posts: 3
Hi programmers!

How can i display the datas from database into JComboBox?
This are the codes for actionPerformed:

public void actionPerformed (ActionEvent e){

JButton clickedButton = (JButton) e.getSource();

if(clickedButton == retrieving)
retrievingClicked();

JComboBox typeList = (JComboBox)e.getSource();
String typeStrings = (String)typeList.getSelectedItem();
//updateLabel(typeStrings);
typeList.addItem(typeStrings);

}


What's the next step?
[ March 19, 2005: Message edited by: chiatai goh ]
[ March 19, 2005: Message edited by: chiatai goh ]
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32299
    
213

Chiatai,
Welcome to JavaRanch!

Take a look at Sun's JDBC tutorial for the basics of JDBC. Feel free to post in this thread when you have a more specific question.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Display data from database into JComboBox
 
jQuery in Action, 3rd edition