Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javafx.application.Application;
- import javafx.fxml.FXMLLoader;
- import javafx.scene.Parent;
- import javafx.scene.Scene;
- import javafx.stage.Stage;
- public class Main extends Application {
- private static Controller controller;
- @Override
- public void start(Stage primaryStage) throws Exception{
- FXMLLoader loader = new FXMLLoader(getClass().getResource("/sample.fxml"));
- Parent root = loader.load();
- controller = loader.getController();
- primaryStage.setTitle("ugly javafx");
- primaryStage.setScene(new Scene(root, 350, 400));
- primaryStage.show();
- doSomething();
- }
- private void doSomething() {
- controller.sendBtn.setText("aaa");
- }
- public static void main(String[] args) {
- launch(args);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement