Results 1 to 10 of 10
  1. #1
    Stephen Douglas's Avatar
    Stephen Douglas is offline Senior Member
    Join Date
    Mar 2010
    Posts
    137
    Rep Power
    0

    Default How to edit the non-editable code generated by the netbeans ???

    I have imported a component in a form........ i want to edit and probably delete the codes generated by the netbeans.. please suggest.:confused:
    The Quieter you become the more you are able to hear !

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    In general you cannot modify generated code in NetBeans, because the content bind with the xml form. Go through the following.

    FaqFormEditingGuardedBlocks - NetBeans Wiki


  3. #3
    Stephen Douglas's Avatar
    Stephen Douglas is offline Senior Member
    Join Date
    Mar 2010
    Posts
    137
    Rep Power
    0

    Default

    thnx for the reply.... but the post doesn't explains how to delete the generated code apart from adding custom codes to it.
    The Quieter you become the more you are able to hear !

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    It can be done by copying and pasting the file, but you really shouldn't delete or modify this code as doing so will prevent you from editing the d&d gui components. My recommendation is that you learn to code Swing by hand.

  5. #5
    Stephen Douglas's Avatar
    Stephen Douglas is offline Senior Member
    Join Date
    Mar 2010
    Posts
    137
    Rep Power
    0

    Default

    Hi Fubarable its "Y. Progammer" remember me..

    By the way i already tried it..
    copying and pasting the file
    ... but what is
    d&d gui components
    The Quieter you become the more you are able to hear !

  6. #6
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    D&D are the "drag and drop" components. If you mess with the non-editable code, say by editing the file in Eclipse, you will not be able to change the GUI in NetBeans' GUI visual editor.

  7. #7
    Stephen Douglas's Avatar
    Stephen Douglas is offline Senior Member
    Join Date
    Mar 2010
    Posts
    137
    Rep Power
    0

    Default

    I got it. So literally speaking there is no straight forward way to edit the auto generated code.Isn't it?
    The Quieter you become the more you are able to hear !

  8. #8
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,015
    Rep Power
    20

    Default

    That's the price you pay for using a UI designer.
    If it's a price you're happy to pay then you live with it, if not then you need to learn how to code Swing by hand.

  9. #9
    StandbyMode is offline Member
    Join Date
    Jun 2012
    Posts
    1
    Rep Power
    0

    Default Re: How to edit the non-editable code generated by the netbeans ???

    I'm working with NetBeans 7.1.1, just saying it because I have no experience with previous versions and the feature might be new, but in the "Design" view it is possible to right-click compnents and select "Customize Code"; this does not allow you to edit all the pregenerated code but some of the crucial code affecting the selected component. Hope it helps, it certainly did for me.

  10. #10
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,244
    Rep Power
    19

    Default Re: How to edit the non-editable code generated by the netbeans ???

    Quote Originally Posted by StandbyMode View Post
    Hope it helps
    You really think Stephen's waiting for an answer more than 1 years after asking the question?

    Closing this thread. In future, please don't post to old dead threads.

    db

    THREAD CLOSED
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Online IDE to edit and compile code?
    By DarrenReeder in forum Other IDEs
    Replies: 1
    Last Post: 02-06-2011, 01:58 AM
  2. Replies: 0
    Last Post: 03-28-2010, 09:55 AM
  3. Can I edit Entity Classes in netbeans
    By dilanka007 in forum New To Java
    Replies: 0
    Last Post: 01-16-2010, 12:53 AM
  4. How To Edit/Add JSP Pages in NetBeans IDE
    By JavaForums in forum NetBeans
    Replies: 2
    Last Post: 02-17-2009, 11:14 AM
  5. How to delete pre-generated code?
    By Terentius in forum NetBeans
    Replies: 0
    Last Post: 08-19-2008, 04:02 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
  •