-
Swing Components/Netbeans Palette
I'm having some trouble with the Netbeans palette manager. I created a new class that extends JPanel. All that I'm changing is the paintComponent method. I want to add this new class into the palette so I can drag and drop it in the GUI design screen.
I compile my new class and put it into a jar file.
I open palette manager, find the jar and import the component that is listed.
The component has an icon that is a page with a question mark on it. When I try to put it onto a GUI design, it stalls the program until I undo the addition.
Any idea on how exactly to get a component onto the palette?
-
Netbeans is probably invoking your paintComponent method in order to display a preview of the widget. Is it possible that your paintComponent method could be broken in some way or just be really slow?
~evlich
-
Hmm, that is a possibility. So there's no special code that needs to be added to the actual component to allow it to work properly?
-
I would seriously doubt it. Think about it, if that was the case then they would have to extend the Swing interfaces. There might be additional classes that are written which detail the interface, or they may use reflection to look at fields for configuration. But I would doubt that the is anything special that you have to put in your class.
~evlich
-
Dragging Components from Projects Explorer
This is a small, but very useful feature. If you have developed a component, you can drag it directly from the Projects explorer and drop it onto a form. (Note the component must be compiled.) You don't need to package and install the component to palette if you don't plan to use it often or in more projects.
For more info check: http://form.netbeans.org/updates/update55.html#dragging
Kamesh
Similar Threads
-
By Wesley Long in forum VB Classic
Replies: 2
Last Post: 10-18-2002, 12:35 PM
-
By Darren Bell in forum Talk to the Editors
Replies: 2
Last Post: 09-20-2002, 10:32 AM
-
By JB in forum Talk to the Editors
Replies: 3
Last Post: 09-16-2002, 08:15 PM
-
By Shaun Botha in forum Java
Replies: 5
Last Post: 06-25-2001, 09:19 PM
-
By Fabio Luis De Paoli in forum Java
Replies: 0
Last Post: 08-17-2000, 01:06 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|