Top DevX Stories
Creating Custom Export Filters for StarOffice with XSLT
WPF Wonders: Using DataTemplates
Crystal Reports Family Offers Options for Developers
Avaya Aura Session Manager video
Avaya Aura Overview video
Search the forums:

Go Back   DevX.com Forums > DevX Developer Forums > Java

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 11-28-2005, 01:21 PM
Massif Massif is offline
Registered User
 
Join Date: Nov 2005
Posts: 9
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?
Reply With Quote
  #2  
Old 11-28-2005, 06:06 PM
evlich evlich is offline
Registered User
 
Join Date: Aug 2003
Posts: 313
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
Reply With Quote
  #3  
Old 11-30-2005, 12:29 PM
Massif Massif is offline
Registered User
 
Join Date: Nov 2005
Posts: 9
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?
Reply With Quote
  #4  
Old 11-30-2005, 07:29 PM
evlich evlich is offline
Registered User
 
Join Date: Aug 2003
Posts: 313
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
Reply With Quote
  #5  
Old 10-24-2009, 04:50 PM
kamesh_sheoran kamesh_sheoran is offline
Registered User
 
Join Date: Oct 2009
Posts: 1
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
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make a floating tool palette Wesley Long VB Classic 2 10-18-2002 01:35 PM
Swing is dead, long live SWT Darren Bell Talk to the Editors 2 09-20-2002 11:32 AM
Swing: If it looks like a dog and walks like a dog, "Bark" JB Talk to the Editors 3 09-16-2002 09:15 PM
Using Swing with JSP Shaun Botha Java 5 06-25-2001 10:19 PM
VisualCafe3Pro and Swing 1.1.1? Fabio Luis De Paoli Java 0 08-17-2000 02:06 PM


All times are GMT -4. The time now is 01:52 AM.


Sponsored Links



Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.