List of usage examples for javafx.stage Stage show
@Override public final void show()
From source file:Main.java
@Override public void start(Stage primaryStage) { FlowPane flowPane = new FlowPane(Orientation.HORIZONTAL); flowPane.setPrefWrapLength(210);//from ww w. j av a2s. com Button btn = new Button(); for (int i = 0; i < 8; i++) { btn = new Button("Button"); btn.setPrefSize(100, 50); flowPane.getChildren().add(btn); } Scene scene = new Scene(flowPane); 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);/*w ww .j av a 2s . c o m*/ stage.setHeight(150); Button button = new Button("Hover Over Me"); Tooltip toolTip = new Tooltip("Tooltip for Button"); System.out.println(toolTip.getGraphic()); button.setTooltip(toolTip); ((Group) scene.getRoot()).getChildren().add(button); stage.setScene(scene); stage.show(); }
From source file:analyzer.code.FXMLAnalyzerController.java
@FXML private void metricsCplusPlusMunuItem() throws FileNotFoundException, IOException { FXMLLoader loader = new FXMLLoader(getClass().getResource("FXMLMetrics.fxml")); try {//ww w . j av a2 s . com AnchorPane pane = (AnchorPane) loader.load(); fxmlmc = loader.getController(); fxmlmc.setAnalyzer((AnalyzerC) analyzer); Scene scene = new Scene(pane); Stage stage = new Stage(); stage.setScene(scene); stage.setTitle(" ++"); stage.show(); } catch (Exception e) { e.printStackTrace(); } }
From source file:Main.java
@Override public void start(Stage primaryStage) { Group group = new Group(); Path spade = new Path(); spade.getElements().add(new MoveTo(25.0f, 0.0f)); spade.getElements()/* www . java2s . c om*/ .add(QuadCurveToBuilder.create().controlX(40.0f).controlY(50.0f).x(27.0f).y(30.0f).build()); group.getChildren().add(spade); Scene scene = new Scene(group, 300, 200); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { PieChart pieChart = new PieChart(); pieChart.setData(getChartData());/*from w w w.j av a 2 s . c o m*/ pieChart.setTitle("Title"); pieChart.setLegendSide(Side.LEFT); pieChart.setClockwise(false); pieChart.setLabelsVisible(false); StackPane root = new StackPane(); root.getChildren().add(pieChart); primaryStage.setScene(new Scene(root, 300, 250)); primaryStage.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 a 2 s .co m*/ stage.setHeight(150); Button button = new Button("Hover Over Me"); Tooltip toolTip = new Tooltip("Tooltip for Button"); System.out.println(toolTip.isActivated()); 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 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"); System.out.println(toolTip.fontProperty()); button.setTooltip(toolTip); ((Group) scene.getRoot()).getChildren().add(button); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { CategoryAxis xAxis = new CategoryAxis(); NumberAxis yAxis = new NumberAxis(); LineChart lineChart = new LineChart(xAxis, yAxis); lineChart.setData(getChartData());//from w w w . java 2 s.co m lineChart.setTitle("Chart"); StackPane root = new StackPane(); root.getChildren().add(lineChart); primaryStage.setScene(new Scene(root, 400, 250)); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle(""); Group root = new Group(); Scene scene = new Scene(root, 300, 250, Color.WHITE); Rectangle r = new Rectangle(); r.setX(50);// www.j ava 2 s . c o m r.setY(50); r.setWidth(200); r.setHeight(100); r.setArcWidth(20); r.setArcHeight(20); root.getChildren().add(r); 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);// ww 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.getTextOverrun()); button.setTooltip(toolTip); ((Group) scene.getRoot()).getChildren().add(button); stage.setScene(scene); stage.show(); }