あなたはCSSスタイルを経由してパディングを削除することができ
ソリューション:
.hyperlink {
-fx-padding: 0;
}
それとも希望の場合は、コードでそれを行うことができます。
link.setPadding(new Insets(0));
背景を
デフォルト設定は、お使いのJREの配布パッケージに含まjfxrt.jar
ファイルにmodena.css
ファイルで見つけることができ、それは次のとおりです。
サンプルのスクリーンショットで
-fx-padding: 0.166667em 0.25em 0.166667em 0.25em; /* 2 3 2 3 */
サンプル・アプリケーション

秒ハイパーリンクにはフォーカスがあります(したがって、点線の枠線)。
import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.control.Hyperlink;
import javafx.scene.layout.Pane;
import javafx.scene.text.Text;
import javafx.scene.text.TextFlow;
import javafx.stage.Stage;
public class HyperSpace extends Application {
@Override
public void start(Stage stage) {
TextFlow textFlow = new TextFlow(
unstyle(new Hyperlink("Jane")),
new Text("'s awesome "),
unstyle(new Hyperlink("links"))
);
stage.setScene(new Scene(new Pane(textFlow)));
stage.show();
}
private Hyperlink unstyle(Hyperlink link) {
link.setPadding(new Insets(0));
return link;
}
public static void main(String[] args) {
launch(args);
}
}