How can I use other Swing classes? Follow
How should I use other swing-classes which are not presented on designer panel. For example JLayeredPanel (that is what I actually need). And what shuold I do to bind panles with class-fields. Because when I make binding only fields like buttons or TextFields are created in class code, but not panels.
Please sign in to leave a comment.
You can add your own components to the palette by right clicking in the Palette window and selecting 'Add Component' from the context menu.
Create the field manually in the class and then attach the panel to the field by selecting it in the 'field name' property dropdown.
thanks! But when I add something to the panel always apperars some errors like there is no such class. What could it be?
Can you give some more details what you're doing exactly and where you get this error?
I'm trying to do a similar thing with one of the SwingX components - a JXDatePicker. The component appears in the palette, but when I add a date picker to the form, the UI Designer box shows an error:
Class "org.jdesktop.swingx.JXDatePicker" cannot be instantiated: org.jdesktop.swingx.plaf.basic.BasicMonthViewUI
If I preview or run the app - the date pickers work fine.
TJ> I'm trying to do a similar thing with one of the SwingX components -
TJ> a JXDatePicker. The component appears in the palette, but when I add
TJ> a date picker to the form, the UI Designer box shows an error:
TJ> Class "org.jdesktop.swingx.JXDatePicker" cannot be instantiated:
Thanks for your report! This was actually a bug in the UI Designer, and it'll
be fixed in a bugfix update for IDEA 6.0.
"Develop with Pleasure!"
actually I tried to add a class that extends JTree, but I still have the same problem, although the bug seems to have been fixed... I tried two things:
I decalred this class in another package, so I had the error:
which I don't really understand! However in the designer it recognizes it as a JTree.
Then I tried to decalre the class within the class representing the form. So I had the error:
< Class "MyClass$DnDJTree" not found>
and the designer doesn't recognize it as JTree, instead of that all the panel are filled in red...
could anyone help me!?
Thanks a lot.