import
javafx.application.Application;
import
javafx.scene.Scene;
import
javafx.scene.control.*;
import
javafx.scene.layout.*;
import
javafx.stage.Stage;
import
javafx.event.ActionEvent;
import
javafx.event.EventHandler;
import
javafx.scene.Group;
import
javafx.geometry.*;
public
class
Toolbar_1
extends
Application {
public
void
start(Stage stage)
{
try
{
stage.setTitle(
"creating toolbar"
);
Label label =
new
Label(
"Toolbar"
);
Button button1 =
new
Button(
"Button1"
);
Button button2 =
new
Button(
"Button2"
);
ToolBar toolbar =
new
ToolBar();
toolbar.getItems().add(label);
toolbar.getItems().add(button1);
toolbar.getItems().add(button2);
toolbar.setOrientation(Orientation.VERTICAL);
HBox hbox =
new
HBox(toolbar);
Scene scene =
new
Scene(hbox,
300
,
300
);
stage.setScene(scene);
stage.show();
}
catch
(Exception e) {
System.out.println(e.getMessage());
}
}
public
static
void
main(String args[])
{
launch(args);
}
}