Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove hyperlink border in JavaFX?

Does anyone know how to remove the default dotted border of a hyperlink in css?

enter image description here

Also, how do I move the hyperlink to the left so it alligns with the password label? Any help will be appreciated!

like image 703
Michael Avatar asked Nov 14 '16 15:11

Michael


1 Answers

Just set the border color to transparent in a CSS stylesheet. The padding can be removed using the -fx-padding property:

.hyperlink {
    -fx-border-color: transparent;
    -fx-padding: 4 0 4 0;
}

or set the border to empty from java code

link.setBorder(Border.EMPTY);
link.setPadding(new Insets(4, 0, 4, 0));
like image 194
fabian Avatar answered Sep 30 '22 09:09

fabian