Skip to content

Instantly share code, notes, and snippets.

@ArchdukeTim
Created March 10, 2020 17:12
Show Gist options
  • Save ArchdukeTim/b58ad3bc928d90e4840418caa1fbd712 to your computer and use it in GitHub Desktop.
Save ArchdukeTim/b58ad3bc928d90e4840418caa1fbd712 to your computer and use it in GitHub Desktop.
CS3733 Starter Code
package edu.wpi.teamname;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
public class App extends Application {
@Override
public void init() {}
@Override
public void start(Stage primaryStage) {
Label label = new Label("Text");
label.setId("textLabel");
label.setVisible(false);
Button button = new Button("My Button");
button.setId("showTextButton");
button.setOnAction((e) -> label.setVisible(true));
BorderPane root = new BorderPane();
root.setRight(label);
root.setLeft(button);
Scene scene = new Scene(root, 200, 100);
primaryStage.setScene(scene);
primaryStage.show();
}
@Override
public void stop() {}
}
package edu.wpi.teamname;
public class Main {
public static void main(String[] args) {
App.launch(App.class, args);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment