- Indentation style settings
- To change editor settings.
- Click the Tools > Options menu item.
- In the icon display on the left, click Editor.
- In the right panel, select the Indentation tab.
- If it isn't already done, set the following:
- Statement continuation Indent: 8
- Number of Spaces per Indent: 4
- Check Expand Tabs to Spaces.
- If you like the Allman indentation style, check the Add New Line before Brace box.
- Modifying the initial template for Java classes
- When NetBeans creates one of several different types of initial files for you, it uses a template. Edit one or more of these templates so the files start with the text you want, eg, comments with your name, etc.
- Select the Tools > Template Manager menu item. This displays a dialog box.
- Expand the Java Classes tree folder in the dialog box. [Ignore all the other folders.]
- Select Java Main Class or Java Class because these are what you will be using. Click the Open in Editor button at the bottom of the dialog box.
- Edit the file to look like what you want your initial file to look like. I typically change the comments to my preferred style. The text contains predefined symbols, like __DATE__, which will be expanded as appropriate when the template is used.
- Save it.
- Changing to generic, type-safe, data structures. Deprecation warnings.
- When compiling a program that uses non-generic data structures, it's possible to accidentally add an element of the wrong type. To alert you to places where this might be a problem, add
- Right click on the project in the Projects panel at the left.
- Select Properties at the bottom of the popup menu.
- Click on Build > Compiling in the left panel.
- To enable the most useful compiler warnings, in the Additional Compiler Options, put
-Xlint:all -Xlint:-serial
-Xlint:unchecked<[>Click OK. This turns on all warnings, but turns off warnings about not making your class serializable, which is really fine for most cases.- Also click Report Used of Deprecated APIs to be informed about obsolete library features you are using.
- Turning runtime assertion checking on
-
- Right click on the project icon in the Project panel at the left.
- Select
Propertiesat the bottom of the drop-down menu. - Click on the
Runchoice in the left panel. - In the VM Options text field at the right, enter "-ea" (without the quotes). "ea" stands for enable assertions. VM stands for Virtual Machine in this case, not virtual memory.
Monday, November 19, 2007
Settings in java NetBeans you might want to change
Subscribe to:
Post Comments (Atom)
Archives
-
▼
2007
(178)
-
▼
November
(178)
- java Font
- explain java.awt.Polygon in java
- Drawing an image using ImageIcon in java
- java.awt.Color Class
- explain java.awt.Graphics Class - Basic drawing me...
- Graphics methods and related classes in java
- define java GridBagLayout
- CardLayout in java
- define java BoxLayout, Box
- define and declaration of BoxLayout, CardLayout, G...
- FlowLayout, BorderLayout, GridLayout in java
- Low-level java gui Containers - special purpose - ...
- Low-level Container supporting layouts in java - J...
- java JFrame - window, typically subclassed
- short notes on Java GUI Containers
- declaration of JCheckBox - Check box followed by t...
- declaration of JTextArea in java - Box containing ...
- declaration of java JButton - Standard clickable b...
- about JTextField in java gui components - Box cont...
- about JLabel in java gui component - For fixed text.
- java Basic GUI Components
- java 3d arrays Initial values
- usage of static in java array sizes
- Visualizing java two-dimensional arrays
- define java 2-dimensional Arrays
- Shuffling (randomizing) an array in java
- Use of java Arrays.asList(...) for Collections vie...
- java.util.Arrays.toString(...) for debugging
- java arrays library methods
- Iterating over an array in java
- java array Subscripts - Accessing elements of the ...
- java Array initial values
- Array Declaration in java
- short notes on java summary
- explain javastringbuffer - java.util.StringBuilde...
- ANSI/ASCII and Extended Latin Sections of Unicode
- character data types in java
- example program on java Inner class listener (xicl)
- example program on Add anonymous action listener (...
- example programs on Graphics class (xgraphics)
- java Applet - Application (xappapp)
- example program on java Generic GUI program (xgui)
- java Comment header (xheader)
- java NetBeans Code Snippets
- java String Concatenation
- java String methods
- Java: Summary - String
- java Object Operators
- java Casts
- java Bitwise Operators
- java Assignment Operators
- java Conditional Operator
- java Logical Operators
- java Arithmetic Operators
- Java: Summary - Expressions
- java Character, String, ... classes
- java Boolean class
- java Floating-point classes
- java Integer classes
- java Classes
- Java: Summary - Data
- Software Engineering: Function Point Analysis: Tra...
- Software Engineering: Function Point Analysis: Dat...
- Counting function points in java
- Software Engineering: Function Point Analysis: Int...
- Java: Method Cyclomatic Complexity
- Java: Complexity Measurement
- Java: Complexity is your enemy
- Examples in Java
- Usefulness of java frameworks
- What is a java framework?
- Java: Frameworks
- JOptionPane.showMessageDialog
- Java: Debugging Output
- java Programmer errors - throw an exception
- java Debugging error checking - assert
- Java: Error processing
- java Rigorous testing
- java Catch runtime errors early if possible
- java Compile-time errors are the best
- Java: Fail Early, Fail Often
- java working program
- java Iterative/Incremental Development
- Java: Development Process
- Java: Design By Contract
- Java: Cohesion
- Java: Coding Guidelines v2 - Summary
- java applet HTML tag
- Converting java Applets to Applications
- java Applets
- how to Compiling a Java program
- java Applications - text example
- JAVA Class libraries
- Java support for large programming projects
- Object Oriented Programming - OOP
- Java Strings are not Arrays of char
- Java and C Arrays
- Java is harder because ...
- Java: Java vs. C
- Java portability
- define Java Virtual Machine
- Java: Java Virtual Machine
- Java: History of Java
- Java: Weaknesses
- Java: Strengths
- java AWT advantages
- java Swing advantages
- Must choose between java Swing and AWT
- Java: GUI - Swing vs. AWT
- java JLint
- java Jalopy
- Java Coding Standard Checker
- java FindBugs
- java Checkstyle
- java PMD
- Style and Correctness of java Checkers
- Usage of java ant
- Simple build.xml file
- java Ant
- java TextPad Problems?
- 3. Entering, compiling, and executing your Java pr...
- 2. Download and install java TextPad
- java TextPad Editor + JDK
- java GUI editor - Connecting components to code (l...
- java GUI editor - Toggle between Source and Design...
- Starting a new java GUI project (covered in the ww...
- Packaging resources (eg images, data, ...) with yo...
- Settings in java NetBeans you might want to change
-
▼
November
(178)
No comments:
Post a Comment