This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes populate jList with database values.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "populate jList with database values...." Watch "populate jList with database values...." New topic
Author

populate jList with database values....

kanika puri
Greenhorn

Joined: Nov 11, 2010
Posts: 4
i want to enter data in jlist from database according to some criteria... how can i do it.
any help would be nice...
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3068
    
  33

kanika puri wrote:i want to enter data in jlist from database according to some criteria... how can i do it.
any help would be nice...


You can read about building a JList here- http://download.oracle.com/javase/6/docs/api/javax/swing/JList.html

You can get the ResultSet data into a Vector and then pass it on to the constructor of the JList or you can use setListData as well.


Mohamed Sanaulla | My Blog
 
jQuery in Action, 2nd edition
 
subject: populate jList with database values....
 
Similar Threads
JList data from a database - 2 columns - 1 column hidden
JList + Vector
Swing and pattern observer
JList selection to int not working
Display selected item in JList