回答編集履歴
1
typo
answer
CHANGED
@@ -8,8 +8,6 @@
|
|
8
8
|
|
9
9
|
```java
|
10
10
|
import javafx.application.Application;
|
11
|
-
import javafx.event.ActionEvent;
|
12
|
-
import javafx.event.EventHandler;
|
13
11
|
import javafx.scene.Scene;
|
14
12
|
import javafx.scene.control.Button;
|
15
13
|
import javafx.scene.control.TextArea;
|
@@ -24,11 +22,11 @@
|
|
24
22
|
Application.launch(App.class, args);
|
25
23
|
}
|
26
24
|
|
27
|
-
|
25
|
+
public static class App extends Application {
|
28
26
|
private Rectangle newReac() {
|
29
27
|
final Rectangle rect = new Rectangle(10, 10);
|
30
28
|
rect.setStyle("background: red");
|
31
|
-
rect.setFill(new Color(Math.random(),Math.random(),Math.random(), 1.0));
|
29
|
+
rect.setFill(new Color(Math.random(), Math.random(), Math.random(), 1.0));
|
32
30
|
return rect;
|
33
31
|
}
|
34
32
|
|