ToolBar in JavaFX
________________________________________________
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.Label;
import javafx.scene.control.ToolBar;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class JavaFXToolBar extends Application{
@Override
public void start(Stage pStage) {
Label lbl = new Label("ToolBar");
Button btn = new Button("Click!");
CheckBox chBox = new CheckBox("Check!");
ToolBar bar = new ToolBar(lbl, btn, chBox);
VBox box = new VBox(bar);
Scene scene = new Scene(box, 250, 250);
pStage.setTitle("JavaFX ToolBar");
pStage.setScene(scene);
pStage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}
_____________________________________________
Dark Hers
YouTube
https://instagram.com/darkhers
https://www.facebook.com/darkhers
TikTok
https://www.tiktok.com/@darkhers
https://www.pinterest.co.uk/darkhers
Comments
Post a Comment