SECTION 7 Look and Feel

Tip 58: Disable Antialiased Font Rendering in the Editor

NetBeans IDE 6.0 supports subpixel antialiasing in the editor by default. With older versions of the NetBeans IDE running on older hardware, or in a remote desktop environment, you may wish to disable antialiasing in the editor to make the windows redraw more quickly.

  1. Choose Tools > Options from the menu.

  2. In NetBeans Version 5.0 and later, click the Advanced Option button for advanced settings.

  3. Select Editing > Editor Settings > Text Antialiasing (see Figure 61).

    FIGURE 61: Antialiasing settings in the Advanced Options dialog

    image
  4. Uncheck the box to disable smoothed fonts.

You need to use JDK 5 or later to be able to activate font smoothing. For subpixel antialiasing you must be using JDK 6 or later.

Tip Source

http://blogs.sun.com/roumen/entry/subpixel_antialiasing_fontrendering_in_editor

Tip 59: Change the Font Size

You can change the editor’s font size, annotation, and syntax highlighting behavior by selecting Tools > Options > Fonts & Colors from the menu. To change the IDE’s font size globally, including menus and dialogs, use a start-up option.

For comparison, the IDE’s default font size is 13. To set the font size to 18, as shown in Figure 62, you would start the IDE with the following command:

FIGURE 62: The NetBeans IDE with a font size of 18

image

netbeans.exe --fontsize 18


Changing the font size not only is useful for the visually impaired, but using a bigger font also can help increase readability during presentations—for example, when demonstrating application development with a projector.

To keep this option permanently, add it to .netbeans/6.0/etc/netbeans.conf in your home directory.

  1. If the netbeans.conf file already exists, make a backup. Then add the switch at the end of the existing netbeans_default_options line, before the closing quote. The result should look like the following example:

    netbeans_default_options="-J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-
    Xverify:none -J-Dapple.laf.useScreenMenuBar=true --fontsize 18"


  2. If the netbeans.conf file or the etc directory does not exist yet, create it. Open the netbeans.conf file in a text editor and enter the following line:

    netbeans_default_options="--fontsize 18"


  3. Save the file and restart the IDE.

Tip Source

http://blogs.sun.com/roumen/entry/netbeans_quick_tip_3_increasing

Tip 60: Switch to a Different Look and Feel

Just as with any standard Java application, you can run the NetBeans IDE with a custom look and feel. You specify the --laf option when starting the IDE on the command line. For example, to make the IDE use the “Metal” look and feel, you type:

netbeans.exe --laf
javax.swing.plaf.metal.MetalLookAndFeel


Look at the documentation; usually you can adjust further options to customize the look.

The Metal look and feel is bundled with the Java platform. To use another look and feel, the JAR with the custom look and feel classes must be on the Java classpath.

image  To add the JAR to the classpath, additionally supply the path using the --cp:p option on the command line. The following example uses the Substance look and feel:

        netbeans.exe -cp:p substance.jar --laf org.jvnet.substance.SubstanceLookAndFeel

image  Alternatively, you can copy (or symlink) the JAR into your NetBeans installation’s library directory. For NetBeans IDE 6.1, the library directory is platform8/lib/.

To keep this option permanently, add it to the .netbeans/6.0/etc/netbeans.conf file in your home directory. For testing, you can use the Metal look and feel that is already provided in your Java installation.

  1. If the netbeans.conf file already exists, make a backup. Then add the switch at the end of the existing netbeans_default_options line, before the closing quote. The result should look like the following example:

    netbeans_default_options="-J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m
    -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true --laf javax.swing.plaf.metal.
    MetalLookAndFeel"

  2. If the netbeans.conf file or the etc directory does not exist yet, create it. Open the netbeans.conf file in a text editor and enter the following line:

    netbeans_default_options="--laf javax.swing.plaf.metal.MetalLookAndFeel"

  3. Save the file and restart the IDE.

Tip Source

http://blogs.sun.com/roumen/entry/how_we_are_solving_some

http://www.netbeans.org/competition/look-and-feel.html

http://java.sun.com/docs/books/tutorial/uiswing/lookandfeel/plaf.html

http://blogs.sun.com/geertjan/entry/music_notepad_part_4

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.202.167