aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Jlist problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Jlist problems" Watch "Jlist problems" New topic
Author

Jlist problems

mizo halwagy
Greenhorn

Joined: Dec 05, 2007
Posts: 3
hi
i have problems with jlist to add items and deal with it and the main problem that i want to add these items from database
how can add items at jlist from database
i mean i don't want to add the items manualy ,i only want when i access to data base i the data come from to data base and add to jlist automaticaly
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41873
    
  63
There is no way to automatically construct a JList from a DB query. You'll need to iterate through the ResultSet and store the elements in the JList one by one. What is the reason for not wanting to do that?


Ping & DNS - my free Android networking tools app
mizo halwagy
Greenhorn

Joined: Dec 05, 2007
Posts: 3
thanks but can you send me the code of this problem
and how can i communicate with you
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38865
    
  23
Originally posted by mizo halwagy:
thanks but can you send me the code of this problem
and how can i communicate with you

Please don't try to get answers away from the forum. The idea is that when you show us the problem and somebody helps you find the solution, then everybody can learn from your experience.
[ December 09, 2007: Message edited by: Campbell Ritchie ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jlist problems