Skip to content
Snippets Groups Projects
Commit dc050579 authored by Joel Cavat's avatar Joel Cavat
Browse files

Change handler

parent 4889c176
Branches
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ public class Main extends Application { ...@@ -20,7 +20,7 @@ public class Main extends Application {
Button b = new Button("Click me!"); Button b = new Button("Click me!");
int[] nb = {0}; // A lambad could refer only references. Primitive types cannot be modified int[] nb = {0}; // A lambad could refer only references. Primitive types cannot be modified
b.setOnMouseClicked( e -> l.setText( "Clicked " + ++nb[0] + " times") ); b.setOnAction( e -> l.setText( "Clicked " + ++nb[0] + " times") );
VBox pane = new VBox(10); //new StackPane(l, b); VBox pane = new VBox(10); //new StackPane(l, b);
pane.setAlignment(Pos.CENTER); pane.setAlignment(Pos.CENTER);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment