Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to underline the text of a TextArea

twasylJan 4 2013 — edited Jan 12 2013
Hi everybody,

I've been trying to underline the text of a TextArea without success. I've tried different things like:
TextArea textArea = new TextArea();
textArea.setStyle("-fx-underline: true;");
or:
TextArea textArea = new TextArea();
textArea.lookup(".text-input").setStyle("-fx-underline: true;");
According the CSS reference guide (http://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html) the -fx-underline property is available for a Text and a Labeled, and TextArea is not one of them. And a TextArea is a TextInputControl, which supports some font properties but none of them is an underlying one.

Anybody has an idea? Or should I switch to a WebView?

Thanks.

PS: configuration: OS X 10.7 | 10.8 - JDK 7u10 - JavaFX 2.2.4
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 9 2013
Added on Jan 4 2013
11 comments
4,393 views