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 get default border for TextField?

anilp1Jun 18 2013 — edited Jun 20 2013

In my UI input textfields, I border them red if user enters bad data. However I need to reset the border back to how it was.

field.setStyle("-fx-border-color: gray;");

This does not produce the default border on windows XP (JavaFX2.2.21)

The default border is rounded and lightgray.

I also tried unsuccessfully

field.setStyle("-fx-border-color: null;");

-border-color: null;");r-color: gray;"

This post has been answered by James_D on Jun 18 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 18 2013
Added on Jun 18 2013
6 comments
5,262 views