List of usage examples for javafx.scene.control Button Button
public Button(String text)
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setWidth(300);/*from w w w .ja va2s. c o m*/ stage.setHeight(150); Button button = new Button("Hover Over Me"); Tooltip toolTip = new Tooltip("Tooltip for Button"); System.out.println(toolTip.getTextAlignment()); button.setTooltip(toolTip); ((Group) scene.getRoot()).getChildren().add(button); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setWidth(300);/* w ww . j a v a 2 s. co m*/ stage.setHeight(150); Button button = new Button("Hover Over Me"); Tooltip toolTip = new Tooltip("Tooltip for Button"); toolTip.setWrapText(true); System.out.println(toolTip.textOverrunProperty()); button.setTooltip(toolTip); ((Group) scene.getRoot()).getChildren().add(button); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setWidth(300);/*w ww. j a v a 2 s . c o m*/ stage.setHeight(150); Button button = new Button("Hover Over Me"); Tooltip toolTip = new Tooltip("Tooltip for Button"); toolTip.setWrapText(true); System.out.println(toolTip.textProperty()); button.setTooltip(toolTip); ((Group) scene.getRoot()).getChildren().add(button); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setWidth(300);//from w w w . j av a2 s . co m stage.setHeight(150); Button button = new Button("Hover Over Me"); Tooltip toolTip = new Tooltip("Tooltip for Button"); toolTip.setWrapText(true); System.out.println(toolTip.textAlignmentProperty()); button.setTooltip(toolTip); ((Group) scene.getRoot()).getChildren().add(button); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setWidth(300);//from w ww .ja v a 2 s . co m stage.setHeight(150); Button button = new Button("Hover Over Me"); Tooltip toolTip = new Tooltip("Tooltip for Button"); toolTip.setWrapText(true); System.out.println(toolTip.wrapTextProperty()); button.setTooltip(toolTip); ((Group) scene.getRoot()).getChildren().add(button); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setWidth(300);//from w w w . j a v a2 s. c o m stage.setHeight(150); Button button = new Button("Hover Over Me"); Tooltip toolTip = new Tooltip("Tooltip for Button"); toolTip.setWrapText(true); button.setTooltip(toolTip); Tooltip.uninstall(button, toolTip); ((Group) scene.getRoot()).getChildren().add(button); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(final Stage stage) { stage.setTitle("HTML"); stage.setWidth(500);/*from w w w .j a v a 2s .c o m*/ stage.setHeight(500); Scene scene = new Scene(new Group()); VBox vbox = new VBox(8); // spacing = 8 vbox.getChildren().addAll(new Button("Cut"), new Button("Copy"), new Button("Paste")); scene.setRoot(vbox); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { BorderPane bp = new BorderPane(); bp.setPadding(new Insets(10, 20, 10, 20)); Button btnTop = new Button("Top"); bp.setTop(btnTop);//from ww w .java 2 s .c o m Button btnLeft = new Button("Left"); bp.setLeft(btnLeft); Button btnCenter = new Button("Center"); bp.setCenter(btnCenter); Button btnRight = new Button("Right"); bp.setRight(btnRight); Button btnBottom = new Button("Bottom"); bp.setBottom(btnBottom); Scene scene = new Scene(bp, 300, 200); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setWidth(300);/*from w ww . j ava2 s . c om*/ stage.setHeight(150); Button button = new Button("Hover Over Me"); Tooltip toolTip = new Tooltip("Tooltip for Button"); toolTip.setFont(Font.font("", 0.5)); System.out.println(toolTip.isWrapText()); button.setTooltip(toolTip); ((Group) scene.getRoot()).getChildren().add(button); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setTitle("Tooltip Sample"); stage.setWidth(300);/* w ww . j a v a2s . c o m*/ stage.setHeight(150); Button button = new Button("Hover Over Me"); button.setTooltip(new Tooltip("Tooltip for Button")); ((Group) scene.getRoot()).getChildren().add(button); stage.setScene(scene); stage.show(); }