Issue
How to change caret (cursor) blinking rate in NetBeans? (7.0)
NetBeans developers say that this is supported as a Swing option, see Bug 124211 - Cursor blink rate too fast but I can't figure out the name of this Swing option to set from the command line.
The closest example of setting Swing option that I found is setting look and feel by putting
-J-Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel
to the netbeans.conf.
Solution
There was a module for customizing the Cursor Blinking Rate created by Emilian Bold, but that module is not found easily available. Let me provide a less intuitive way but this solution works with NetBeans IDE 7.0.1 as tested by me.
Make sure the NetBeans IDE is shut down before making these changes.
Create file
<userdir>/config/Editors/text/x-java/properties.xml
Here the<userdir>
means the User directory used by NetBeans IDE. This directory can be found from the NetBeans Help > About menu. Theconfig
folder will already be there in this directory but the foldersEditors/text/x-java
may not be there and we will have to create them, they are case sensitive. Theproperties.xml
file shall also be created in thex-java
folder.Add the following contents to the
properties.xml
file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties PUBLIC "-//NetBeans//DTD Editor Properties settings
1.0//EN" "http://www.netbeans.org/dtds/EditorProperties-1_0.dtd">
<properties>
<property class="java.lang.Integer" name="caret-blink-rate" value="0"/>
</properties>
The value="0" portion can be customized by desired blink rate in miliseconds, the default value used by NetBeans IDE is 300 in my opinion, but it can be changed with a new value, 0 will mean no blinking.
Start NetBeans IDE again and now you will get your desired blink rate for the cursor in Java files.
Answered By - Tushar Joshi