A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Swing / AWT / SWT
Joined: Dec 21, 2000
Mar 30, 2001 02:12:00
In order to add items to the
we are creating a
and adding the items through that. But how to add the items at Run Time. Please help me out it is very urgent
Joined: Feb 20, 2001
Mar 30, 2001 08:00:00
When you write
...we are creating a string and adding the items through that
Does the string get added to a
the moment after you type the code, or does it happen when you run the program?
happens at Run Time (as opposed to say VB which offers the dubious advantages of "Design Time")
The shorter answer for you is: The same way.
A more thoughtful answer: look in the API, under
, there is an addItem(Object obj) method, and remember that Strings are objects.
[This message has been edited by Mike Curwen (edited March 30, 2001).]
subject: Very Urgent---JComboBox
Couldn't add items to a JCombboBox at runtime[very...... urgent......]
multiple listeners on JComboBox Urgent
add values to JCombo Box dynamically[urgent]
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014