Create Label in JavaFX
________________________________________________
package application; import javafx.application.Application; import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.control.Label; import javafx.scene.layout.FlowPane; import javafx.stage.Stage; public class JavaFXLabel extends Application{ @Override public void start(Stage pStage) { FlowPane pane = new FlowPane(); pane.setPadding(new Insets(11, 12, 13, 14)); pane.setVgap(5); pane.setHgap(5); Label labl = new Label("Dark Hers"); Label labl1 = new Label("Thanks for Watching!"); pane.getChildren().addAll(labl, labl1); Scene scene = new Scene(pane, 250, 250); pStage.setTitle("JavaFX Label"); 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