-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:andrewcmyers/oodds
- Loading branch information
Showing
12 changed files
with
406 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<Button id="pressme" fx:id="b" text="Press me!" onAction="#handleButtonPressed"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
b.setOnAction(new EventHandler<ActionEvent>() { | ||
void handle(ActionEvent e) { | ||
print("button clicked"); | ||
println("button clicked"); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
public class Main extends Application implements Initializable { | ||
@FXML private Button theButton; | ||
@FXML private TextArea theTextArea; | ||
|
||
public static void main(final String[] args) { | ||
Application.launch(args); | ||
} | ||
|
||
@Override public void start(final Stage stage) { | ||
try { | ||
final URL r = getClass().getResource("simple.fxml"); | ||
final Parent node = FXMLLoader.load(r); | ||
final Scene scene = new Scene(node); | ||
stage.setTitle("FXML demo"); | ||
stage.setScene(scene); | ||
stage.sizeToScene(); | ||
stage.show(); | ||
} catch (final NullPointerException|IOException e) { | ||
System.out.println("Can't load FXML file."); | ||
try { stop(); } catch (final Exception e2) {} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@FXML | ||
private void handleButtonPressed(final ActionEvent e) { | ||
println("button clicked"); | ||
} |
Oops, something went wrong.