Re: GUI components creation idioms
arittner <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.user-interface |
|---|---|
| Message-ID | <[email protected]> |
Hello!
King Lung Chiu wrote:
>
> I'd like to have them created as items in a data structure (eg. an array
> or ArrayList or HashMap of combo boxes),to make it easier to reference
> them later. Is there an automatic way to do that?
>
I work a long time with Netbeans (since developerX2). I've written a
framework to bind the components with my data objects. But it's very simple
and works with all kind of gui components. I use the name property to set a
unique name. And I've a simple recursive loop over all received components
from Container.getComponents.
JTextField input = new JTextField();
input.setName ("Username");
With my recursive loop I get all "data-aware" components dynamically at
runtime.
HTH, best regards,
josh.
--
View this message in context: http://www.nabble.com/GUI-components-creation-idioms-tf2367563.html#a6663851
Sent from the Netbeans - UI mailing list archive at Nabble.com.