Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #18518
| From | Nigel Wade <nmw@ion.le.ac.uk> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Netbeans "form" code is uneditable unless copy/paste into new java file |
| Date | 2012-09-03 10:39 +0100 |
| Message-ID | <aajc71Fr0hU1@mid.individual.net> (permalink) |
| References | <08941df4-43d5-4db8-acad-62149e87263c@googlegroups.com> |
On 26/08/12 15:44, clusardi2k@aol.com wrote: > How can I modify the code automatically created by Netbeans. Some of > that code appears to be uneditable. You can't. It's created by NetBeans as determined by the properties of each of the palette components in the form. If you start making ad hoc changes to the code the relationship between the form and the code will be broken. NetBeans provides you with many facilities to modify the code which is generated. Much of the functionality of the component is set in the Properties window for that component. The most flexible customization is in available in the "Code" tab of the Properties window. Here you can enter your own code at specific points during the construction/initialization steps of the component. > > Instead, I can copy the code, delete the form file it was in, and > paste the code into a new class. But, the form disappears. At this > code I have all the code, but I lose the "Design" view entirely. Of course, by doing this you have explicitly broken the relationship between the form and the Java code created from it. > > Ok experts, what can I do. Look at all the properties of the component and see if any of them can do what you require. > > The reason I want to do this is the Swing pallet (in design view) > doesn't have things that I need such as modal window capabilities > (jdialogs), and Jlayer capabilities (for a light box effect). Am I > wrong about this. If this is related to you other question regarding modal dialogs, then I would recommend you start here: http://docs.oracle.com/javase/tutorial/uiswing/components/dialog.html The simplest modal dialog is the JOptionPane. Otherwise you can create your own JDialog. This might be in the main GUI, as the "Other Components" section of the form, or a separate class auto-created by the "new JDialog form". A JDialog in the form editor does have the modal property, which is a toggle button in the main Properties for the object. I have no knowledge of JLayer, but you can probably do what you want via the Properties/Code tab of whatever component in the form is most suitable. -- Nigel Wade
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
Netbeans "form" code is uneditable unless copy/paste into new java file clusardi2k@aol.com - 2012-08-26 07:44 -0700
Re: Netbeans "form" code is uneditable unless copy/paste into new java file Arne Vajhøj <arne@vajhoej.dk> - 2012-08-26 10:50 -0400
Re: Netbeans "form" code is uneditable unless copy/paste into new java file markspace <-@.> - 2012-08-26 11:23 -0700
Re: Netbeans "form" code is uneditable unless copy/paste into new java file Lew <noone@lewscanon.com> - 2012-08-26 20:40 -0700
Re: Netbeans "form" code is uneditable unless copy/paste into new java file "John B. Matthews" <nospam@nospam.invalid> - 2012-08-27 01:47 -0400
Re: Netbeans "form" code is uneditable unless copy/paste into new java file "John B. Matthews" <nospam@nospam.invalid> - 2012-08-26 14:54 -0400
Re: Netbeans "form" code is uneditable unless copy/paste into new java file Nigel Wade <nmw@ion.le.ac.uk> - 2012-09-03 10:39 +0100
csiph-web