473,549 Members | 2,829 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 42992
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
3723
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
1795
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...
0
1489
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...
0
1217
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...
13
2247
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...
2
2069
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...
0
3101
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...
1
3184
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...
3
11794
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...
0
7480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7992
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...
1
7511
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7840
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...
0
6088
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3509
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1087
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.