views:

270

answers:

1

I'm using the "Visual Editor" to "paint" my Swing GUI. Can I dynamically build the contents of a sub-panel with VE or do I have to use a predefined sub-class of JPanel (and build that with VE)?

A: 

You can dynamically build the contents of a sub panel - say based on a file or soemthing - the visual editor is not going to stop you.

Generally, VE is intelligent enough to see that you are dynamically build the panel and show the contents (say contents of a file in a JList)

Sometimes, VE fails to render the items because 'The control is too complex' - but this does not happen frequently.

Nivas
Tried to clarify the question .. want to build the whole GUI with VE, including a sub-panel (with boarders) and the widgets in the sub-panel.
IronGoofy
I assume that you want a panel, a sub panel and a lot of widgets in them: I dont see any problem in doing this - should be straightforward, without requiring any subclass of JPanel (just for this purpose).
Nivas