![]() |
The Java Developers Almanac 1.4 |
|
e999. Setting the Blink Rate of a JTextComponent's CaretThe blink rate is specified in milliseconds. In particular, the blink rate causes the caret to appear for T milliseconds and disappear for T milliseconds. JTextComponent c = new JTextArea();
// Set rate to blink once a second
c.getCaret().setBlinkRate(1000);
// Set the caret to stop blinking
c.getCaret().setBlinkRate(0);
e1000. Using the Selection of a JTextComponent
© 2002 Addison-Wesley. |