473,608 Members | 2,077 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to edit grayed out area of GUI in NetBeans?

27 New Member
Please sorry for my dumb question but I cannot find information on how I can change settings so that in NetBeans 6.1 I can edit blue guarded areas.

I read in FAQ NetBeans Wiki: FaqFormEditingG uardedBlocks that I had to change something in Properties->Code ,but I really can't figure out what this should be.

Thanks in advance.
Nov 24 '08 #1
35 43051
Dököll
2,364 Recognized Expert Top Contributor
Hey there!

No dumb questions here:-) But I am not at leisure to help you right now, I will grab my notebook, it has NetBeans installed, then I'll have a look. The text included in your link seems quite fetching though... what happens when you try what is said?

In a bit!
Nov 25 '08 #2
myusernotyours
188 New Member
@ValValVal
The link you gave says in part...
However, please note that you can easily write your code out of the guarded block, typically into the constructor after the initComponents( ) method call, as additional setup code that should be performed. This option is often forgotten, but it is the most eficient and easiset way to add custom code, working in most situation (e.g. except custom instantiation code).
Have you tried that? I find it works for me all the time.
Just put whatever you want to do after initComponents( ) then if you need to change something there, it's always a breeze.
Or you have a special reason why you want to change the generated code directly??

Regards,

Alex.
Nov 25 '08 #3
ValValVal
27 New Member
Hi!
I have no special needs to edit it, but still want to know to get more knoledge about the system ,and sometimes NetBeans generates bad code. In these cases I must help him out.
Nov 25 '08 #4
myusernotyours
188 New Member
@ValValVal
Then do as it says on your link. Right click the component go to properties then code tab.

Here you can put your custom initialization code.
And what do you mean NetBeans generates bad code?
Is it that you can initialize components better?

Regards,

Alex.
Nov 25 '08 #5
myusernotyours
188 New Member
@ValValVal
Then do as it says on your link. Right click the component go to properties then code tab.

Here you can put your custom initialization code.
And what do you mean NetBeans generates bad code?
Is it that you can initialize components better?
NetBeans just uses the properties you assign to components during design to init the components.

Regards,

Alex.
Nov 25 '08 #6
ValValVal
27 New Member
So actually I cannot "edit" the code that I have now? Pity if so.
I asked the question mainly because someone asked me about this grey code in NetBeans.

And yes,sometimes NetBeans (I noticed it ) has code that I want to remove. E.g. when I delete a component it crashes the project because there is grey code referring to it which I would like to remove manually.
Thanks ,Val.
Nov 25 '08 #7
r035198x
13,262 MVP
If you delete a component that you added using Netbeans tools then Net beans should remove all grey code pointing to it.

P.S I use eclipse.
Nov 25 '08 #8
ValValVal
27 New Member
Well it seems sometimes that NetBeans editor is not without flaws.
Val.
Nov 25 '08 #9
myusernotyours
188 New Member
Netbeans does remove generated code if a component is deleted.
I never encountered a situation when it din't.

Anyone else who encountered Val's problem?

Regards,

Alex.
Nov 25 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3726
by: Raymond H. | last post by:
Hello, I'd like to be able to desabled the 'Read only' (and grayed this case) with vb codes. How to do this to protect a file againts deleting? r.h.
1
1799
by: Richard C. Eberhardt | last post by:
I am using NetBeans 3.5 under Mac OS X 10.2 . The program seems to work in general: I can edit, compile, and execute code. My problem is with the debugger. The debugger will run and stop at breakpoints, etc. but when you try to view variable values in the debugger, generally all you get is something like "#1213" in the value field. The NetBeans documentation on the debugger says that sometimes this is all the debugger returns. Of...
0
1495
by: Pawe³ | last post by:
Hi! Within my class (say class A) I have read-only property returning reference to object of type B (since I do not want other to assign another reference to this property). I have created a TypeConverter for class B and I want to allow users to edit properties exposed by object B. And with subproperties its works fine, but property within object A is still "grayed", so User cannot write string value in this field. My...
0
1220
by: Brett Romero | last post by:
For what ever reason, edit and continue isn't working any more. Now I get this message: Edit and Continue Changes are not allowed if the source code on disk does not match the code running in the process. Files in this project can be edited while you are debugging if Edit and Continue is turned off. I also notice the Edit and Continue option is grayed out in options.
13
2252
by: nicolegw | last post by:
I've tried googling for the answer to my question, so my apologies if it's been asked before or is terribly obvious. I'm a volunteer doing data entry for research. My office has an Access database with several hundred fields that was put together by someone who no longer works here. While using this database, I've noticed that it's missing a number of fields that we need. I told the Dr. I'm working for and encouraged her to seek the...
2
2072
by: orangemonkey | last post by:
Hey. Naive question, how do you open and edit java files? I use NetBeans IDE 6.01. Let's say I save a hello world program, I try to double click it, use the open with Netbeans, notepad, anything I could, but I all I get are these weird characters. Shouldn't it just open, ready to edit with my installed IDE, like C++ files? I've also installed JDK 6 update 5. Thanks for reading ! :)
0
3106
by: sokeefe | last post by:
I use NetBeans IDE to develop a Java application. In the past, I could use the Design Editor to edit my form for the GUI. Spontaneously, NetBeans is unable to open the form file, producing this pop-up message labled as "Information": "The form file format is not recognized. The form cannot be opened." This error was allegedly fixed in previous versions of NetBeans. I have the latest version of NetBeans and I am getting this error now,...
1
3186
by: sokeefe | last post by:
I am trying to edit the GUI of a project in Netbeans. In particular, I am trying to add new JButtons. I get a NullPointerException when I try to add an Event to any given JButton (even ones that already exist) in my application using the Design Editor. I go about this by right-clicking on the JButton in the design editor, navigating to Events -> Action -> actionPerformed. The auto-generated code appears for a brief moment before it...
3
11799
by: vipin sharma | last post by:
hello all, i am using netbeans ide for development. I want to display a graph on screen. After some search on google i found that we can create a graph by following steps: 1. extending a class with JPanel and overriding its paintcomponent() method. 2. now create a panel using palette and open its properties. 3. in property window go to code section and write new derivedclassname() in Custom creation code. This is working very fine. but...
0
8063
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8498
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8478
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8341
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5476
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4025
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2474
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1598
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.