Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Populating options in a JComboBox via a text file

807606Feb 21 2007 — edited Feb 22 2007
hi guys - need some homework help!

I have myself a text file (c:\\categories.txt), and need to use that file to populate my options in a JComboBox (I'm not allowed to hard code said values into the combo box basically).

Anyway, categories are listed in .txt file as follows:

Horror
Action
Comedy
Thriller

Anyone know how to accomplish this? I'm at my wits end.

Thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 22 2007
Added on Feb 21 2007
7 comments
1,264 views