This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes how to change the generated code by IDE (netbeans) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "how to change the generated code by IDE (netbeans)" Watch "how to change the generated code by IDE (netbeans)" New topic
Author

how to change the generated code by IDE (netbeans)

akash shrimali
Ranch Hand

Joined: Jul 28, 2010
Posts: 45
how to change the generated code by IDE (netbeans 6.8 )
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39544
    
  27
Are you asking how to edit a text file containing Java source code? I'm guessing not, but I can't really tell from the limited information you provide; you should TellTheDetails.


Ping & DNS - updated with new look and Ping home screen widget
akash shrimali
Ranch Hand

Joined: Jul 28, 2010
Posts: 45
suppose i have made code in net beans and i have made the design using properties on the right side . i want to change the code which is automatically generated by I.D.E .
Hauke Ingmar Schmidt
Rancher

Joined: Nov 18, 2008
Posts: 371
You can't by directly editing the code. Netbeans uses a seperate file for code generation (.form, XML). This is a one-way process, Netbeans is not capable of parsing source code for editing in it's visual editor... This is a catastrophe for interoperability (use Netbeans only for GUI editing or changes will be overwritten when you use it next time; or don't use the Netbeans GUI builder at all); but you can still influence most of the code generated. Changes will be stored in the .form-XML and show up in the generated code.

Just select the component and select the "Code" button in the properties view (the four buttons there are really tabs which show different pages in this view). If you set "Custom Creation Code" to a factory method then you can outsource the code editing to the code editor which is much more convinient.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to change the generated code by IDE (netbeans)
 
Similar Threads
Can I use IDE to create GUI?
sending mail hangs - no exception thrown, mail not sent
Netbeans
Swing Menu item with no children?
OK to use NetBeans UI Form Builder ??