Results 1 to 5 of 5
Thread: creating dynamic objects?
- 06-03-2010, 12:15 PM #1
creating dynamic objects?
Hey im new to java and ive just made my self a GUI with a button.
When i press the button i want to be able to create a new object, is this possible? (and i'd like to be able to press the button multiple times to create multiple objects)
If this is possible, how would i be able to reference the object from a different function since the object is created locally in the cmdChangeActionPerformed button event and not globally?
or am i going about this completely wrong!!!?
thanks
- 06-03-2010, 12:21 PM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
- 06-03-2010, 12:22 PM #3
You could define a global List and add your newly created Objects to it.
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 06-03-2010, 12:48 PM #4
thanks for fast reply and pointing me in right direction guys
- 06-04-2010, 03:51 AM #5
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
You are welcome. And thanks for marking the thread solved.
Similar Threads
-
Creating an Array of Objects
By int80 in forum New To JavaReplies: 4Last Post: 08-09-2011, 12:40 PM -
Creating custom objects
By coltragon in forum New To JavaReplies: 11Last Post: 12-29-2009, 10:50 PM -
Creating Array of Objects
By chathurajeewaka in forum New To JavaReplies: 4Last Post: 12-03-2009, 03:23 PM -
Creating an array of objects
By geowizard in forum New To JavaReplies: 5Last Post: 11-16-2009, 01:25 AM -
Creating objects question
By sergm in forum New To JavaReplies: 2Last Post: 12-27-2007, 04:10 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks