Re: Software engineering problem
masukomi <[email protected]>
| Newsgroups | gmane.comp.embedded.carlsbad-cubes |
|---|---|
| Message-ID | <[email protected]> |
You could always just make a custom tag that generates the appropriate object, added the listener to it, then added it to the parent swing object, then added the object via a .add(...) method in your class. The class could maintain a List / Collection of these items, or maybe a Collection for each type of item. Seems a bit simpler to do it that way to me. One tag for your checkbox, one for your radio, etc. They could all be managed by the same class. -Kate On May 7, 2004, at 9:52 PM, Jerre duine wrote: > Hello, > > I experimented a bit with swixml by making some basic forms. This went > very well, but now I would like to make a more advanced form where you > don't know in advance how many components will be needed. > I use a factory to create the different pieces (e.g. group of radio > buttons, a combobox,...) in the form, but I don't know in advance how > many of these pieces will be needed. Therefore I can't give a > declaration of the needed swing components in advance, neither is it > possible to hard code the needed event handlers for each component. > > I was thinking to make a collection of possible components, adding > listeners to them in the constructor and catching the events by > looking to the (event) source. > > Is this a good solution and, if so, how do I represent then this > collection in my XML file, so that it is possible to find out witch > component has fired the event? > > Thanks in advance, > Greetings, > Jerre > > _________________________________________________________________ > Fan van MSN Messenger? Ontdek de ILoveMessenger website! > http://ilovemessenger.msn.com/?mkt=nl-be > > > _______________________________________________ > Forum mailing list > [email protected] > http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com > >