Re: Copy and Paste JPanel custom component Netbeans 5.5
Wade Chandler <[email protected]> Fri, 9 Nov 2007 04:05:53 -0800 (PST)
| Newsgroups | gmane.comp.java.netbeans.user-interface |
|---|---|
| Message-ID | <[email protected]> |
Please describe the copy/paste some more. In NB, to use your components, all you should have to do is either 1) Install them to the Palette or (in 6.0) 2) Drag the components class from the project files window. Copy/paste should work fine while you are in a form and copy one UI item or a few and paste them to the same form. Were you trying to copy/paste between two forms and had problems? I'm not sure about that use case necessarily. Wade ----- Original Message ---- From: RichardF <[email protected]> To: [email protected] Sent: Friday, November 9, 2007 6:02:16 AM Subject: Re: [nbui] Copy and Paste JPanel custom component Netbeans 5.5 Hi, Thanks for your responses. Alas I have had no luck with any of your suggestions. I ensured each custom component (there are 2) had a default constructor, with 1st line initComponents(). I even commented out all non generated code (on both the custom components and the main dialog) (imports, interface implementations, methods etc). Still i get no luck. I have tried clean and build - still nothing. I tried creating a new empty JFrame form and Ctrl-C/Ctrl-V from my custom components to the form - nothing happens. Originally one of the components did have a custom constructor along with customized initialization code (see http://weblogs.java.net/blog/joshy/archive/2006/02/using_custom_sw.html). After i removed the custom constructor (although I had to edit the main dialog's .form file since i couldn't open the design to remove the 'custom creation code' and also removed the custom initialization code from the initComponents method using a text editor). This still didn't fix it. Eventually (and relucantly!) I re-created the components and GUI elements and then copied in the old code. This worked and I was able to create a new dialog and copy and paste the components onto the dialog. Regards, Rich. ps. Apologies posting to the wrong forum ..... :blush: -- View this message in context: http://www.nabble.com/Copy-and-Paste-JPanel-custom-component-Netbeans-5.5-tf4761409.html#a13664898 Sent from the Netbeans - UI mailing list archive at Nabble.com.