Example usage for javafx.scene.control Hyperlink setFont

List of usage examples for javafx.scene.control Hyperlink setFont

Introduction

In this page you can find the example usage for javafx.scene.control Hyperlink setFont.

Prototype

public final void setFont(Font value) 

Source Link

Usage

From source file:Main.java

@Override
public void start(Stage stage) {
    stage.setTitle("HTML");
    stage.setWidth(500);//www  .  j a  v  a2 s .c  o  m
    stage.setHeight(500);
    Scene scene = new Scene(new Group());
    VBox root = new VBox();

    Hyperlink hpl = new Hyperlink("java2s.com");

    hpl.setFont(Font.font("Arial", 14));

    root.getChildren().addAll(hpl);

    scene.setRoot(root);

    stage.setScene(scene);
    stage.show();
}

From source file:Main.java

@Override
public void start(Stage stage) {
    stage.setTitle("HTML");
    stage.setWidth(500);/* ww  w  .j a v  a 2 s.c  om*/
    stage.setHeight(500);
    Scene scene = new Scene(new Group());
    VBox root = new VBox();

    Hyperlink hpl = new Hyperlink("java2s.com");

    Image image1 = new Image(new File("a.jpg").toURI().toString(), 0, 100, false, false);
    hpl.setFont(Font.font("Arial", 14));
    hpl.setGraphic(new ImageView(image1));
    root.getChildren().addAll(hpl);

    scene.setRoot(root);

    stage.setScene(scene);
    stage.show();
}