In Perl Tk the trick is that you can set the 'insert on time' of a text widget to 0, which has the effect of turning off the blinking cursor:

$self->{status_line}=$self->{status_frame}->Text(

-width=>80,-font=>[-size=>10],-height=>1,

-insertontime=>0)->pack(-side=>'left');

Is there an equivalent of this in Java to turn off the blinking cursor?

解决方案

You can do this in CSS with

-fx-display-caret: false ;

either inline:

textArea.setStyle("-fx-display-caret: false;");

or in an external CSS file:

.text-area {

-fx-display-caret: false ;

}

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐