File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes How to populate drop down box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to populate drop down box" Watch "How to populate drop down box" New topic
Author

How to populate drop down box

Rosy Mary
Greenhorn

Joined: Jan 08, 2009
Posts: 16
Hi there,

I have a doubt of how to populate a list drop down box with values retrived from the data base.

Thanks,
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1479
    
    6



Swastik
Rosy Mary
Greenhorn

Joined: Jan 08, 2009
Posts: 16
Thanks for the reply. If i need to populate a Choice list box then would it be the same query???

Since the screen might have more than 10 records to be feteched and displayed in the choice list box...

Please let me know your comments..

Thanks,
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1479
    
    6

Yes query should be same, because in any case you have to iterate through all the records fetched from underlying table.
Rosy Mary
Greenhorn

Joined: Jan 08, 2009
Posts: 16
Hi,

It worked for me thanks a lot. And i too have some doubt regarding the frame created with out the maximise minimise and the close buttons. I have searched maximum posts for this question. But in most of them i found usage of the method SetDefaultLookAndFeelDecorated and iterating the method, this method is used for JFrames and my screens are designed using Frames.

Can you please let me know how i can incorporate this change in my code..

Thanks,
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Which doubt? I only see a question which is not related to JDBC at all. In English, a "doubt" roughly means "I understand it, but I don´t agree with it", while you actually don´t understand it. You really have a "question" or maybe just a "problem" ;) Start a new topic at the Swing forum. This has nothing to do with JDBC.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31074
    
232

In India, "doubt" means "question" or "query". In any case, I'm moving this to our GUI forum.


[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
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> And i too have some doubt regarding the frame created with out the maximise minimise and the close buttons.
> .... and my screens are designed using Frames.

frame.setUndecorated(true);

but you'll lose the border
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to populate drop down box