views:

65

answers:

2

Hi! In netbeans you can choose to work on "design" or "source". If you don't have a form file, netbeans won't let you see the design and work on that with drag and drop.

I have some existing code with much swing. How can I use the "design" mode in netbeans on that code? To me it seams I can only use the "design" mode if I create a new empty file and work on that.

I can't copy the existing code to new file because netbeans have this autogenerated code that none can edit :S

+1  A: 

Unfortunatly, Netbeans (latest that I try was 6.5) can not generate form file from existen code. So you can only edit it manual, because as you mentored, you can not create new file and copy&paste old code in it. Also, if you not resrticted with using Netbeanse for edit existen swing components -you can try IntelliJ IDEA. As I know - it has special tool for working with existen swing windows. Do not remember details, sorry :) If you don't have IDEA license - you can or:

  • try trial for 30 days (if I'm right)
  • try beta version.

Hope this helps.

St.Shadow
A: 

I am going to try IntelliJ Idea. thanks for the clue. It's cumbersome to work on copy-paste Swing code as there's no visual help. In my case, the swing code is handwritten, having multiple controls.. without any layout.

thanks