JPanel subclasses in UI designer

I'm trying to use a subclass of JPanel in the UI designer, but it is not letting me add any classes as children. Is there something special that needs to be done to accomplish this?

Also, any suggestions on dealing with sections within a form that need to have different contents depending on some other selection in the form?


-Tim

3 comments
Comment actions Permalink

I don't think you're allowed to do this, although I'm not sure. You might want to try configuring your UI with a normal JPanel, then open your .form file with a text editor, find that panel, and change the component class to com.whatever.your.SubClassNameIs. It worked for me and custom JLists and JTables.

0
Comment actions Permalink

I don't think you're allowed to do this, although I'm
not sure. You might want to try configuring your UI
with a normal JPanel, then open your .form file with
a text editor, find that panel, and change the
component class to com.whatever.your.SubClassNameIs.
It worked for me and custom JLists and JTables.


It looks like JPanels get special treatment in the .form XML as well, they're not identified by their class anywhere. This seems like a major limitation of the UI designer. In my case, I'm trying to use a JPanel subclass that has a checkbox item in the border. Anyone know if IDEA 4.5 addresses this inability to have children of anything other than a JPanel?


-Tim

0
Comment actions Permalink

It looks like JPanels get special treatment in the .form XML as well, they're not identified by their class anywhere. This seems like a major limitation of the UI designer. In my case, I'm trying to use a JPanel subclass that has a checkbox item in the border. Anyone know if IDEA 4.5 addresses this inability to have children of anything other than a JPanel?


I have the same problem here :(. The UI Designer seems very limited.

Ahmed.
P.S. By the way, there's another Forum/news thread for the UI deigner
"jetbrains.intellij.eap.uidesigner" .

0

Please sign in to leave a comment.