Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

populate jList with database values....

 
kanika puri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic