Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to generate reference name at runtime  RSS feed

 
swapnel surade
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I'm creating the swing component by reading xml file at runtime.
I have to create the reference name of the component at runtime.
is it possible to create reference name at runtime...

thanks
 
Rob Spoor
Sheriff
Posts: 20895
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Every component has a name you can get and set with getName and setName respectively. You can pass any String to setName, including String dynamically generated at runtime or read from your XML file.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!