--- In [EMAIL PROTECTED], Manuel Tejada
<[EMAIL PROTECTED]> wrote:
>
> Hi All,
> Could anyone give an idea on how to populate a
> JComboBox from an active database connection?
> Thanks
> Manuel
>
>
>
> __________________________________
> Do you Yahoo!?
> Dress up your holiday email, Hollywood style. Learn more.
> http://celebrity.mail.yahoo.com
Hi,
You can do it in many way. I think u allready say two constructor of
Jcombo one is take aray of any oject and another one is take a vector
is an parameter. so your code willbe like this
while(rst.next())
{
//rst is the object of resultset where aviliable query output is there
v.addElements(object ob);
//heare v is an vector and it add any object
JComboBox cb=new JComboBox(combo);
cb.setSize(80,30);//for fixing size of the combo
}
Dont forgot to add the combo in the frame.
minhaz
------------------------ Yahoo! Groups Sponsor --------------------~-->
$4.98 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/5cFolB/TM
--------------------------------------------------------------------~->
If you have any comments or questions, submit it on the message board.
NO spam/ads/job posting or you will be BANNED from this group. Exception can be
made it happen by notify me ahead of time.
all new members' message will be verified by me (spam..) before it get posted.
Yahoo! Groups Links
<*> To reply to this message, go to:
http://groups.yahoo.com/group/java_official/post?act=reply&messageNum=17955
Please do not reply to this message via email. More information here:
http://help.yahoo.com/help/us/groups/messages/messages-23.html
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/java_official/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/