Community
Participate
Working Groups
I want to create a panel that in turn contains nested component panel (I've also created it). I keep getting an error when I try and drop it onto a new JPanel. -------------------------------------------- I've created a JPanel that contains other Swing widgets (TCCommonCaseCriteriaPanel). It has a no-arg constructor and does not access a database. When I click "Choose Component" in the Palette, I am shown a list of components. I select the one in question and attempt to drop it onto another JPanel. I am shown a red/pink box with the words "Exception during live image creation. See error log for details.". Two interesting notes: (1) was able to successfully drop the nested component into a different class after experiencing this error multiple times; (2) in the "Custom" part of the Palette, the TCCommonCaseCriteriaPanel is listed 9 times.
Created attachment 207942 [details] This report contains log files, Java files, etc.
I cut the code from another class that successfully showed the nested class. I pasted into another class on the Source tab. When I clicked the Design tab for the class, the nested class showed up fine. So it appears that the problem is with using the palette to place a nested class. If you enter a nested class on the Source tab then click the Design tab, it seems to work fine. I also downgraded this problem's importance to "normal".
In general, WB does not support components that are nested/inner classes within other classes. All custom components should be represented as top-level Java classes. All custom Swing components should follow normal JavaBean conventions and be public, top-level classes.
(In reply to comment #3) > In general, WB does not support components that are nested/inner classes within > other classes. All custom components should be represented as top-level Java > classes. All custom Swing components should follow normal JavaBean conventions > and be public, top-level classes. If I mis-spoke, I'm sorry - let me clarify. When I use the term "nested", all I am talking about it a "uses" type of relationship. Example: class A and class B are both top-level custom classes that are both descendants of JPanel. Class A has no widgets. Class B has a button. Neither class A nor B has inner classes. The desire is to visually drop class B onto class A so that the developer will see a button on the Design tab when in WB for class A. I can do this by modifying the source for class A (on the Source tab for class A by including code that instantiates class B) then clicking the Design tab. However, if I try to visually place class B as a component onto class A (via the Palette's "Choose Component"), I get "Live image creation internal error".
GroupLayout support issue, fixed in trunk.
Fixed