質問編集履歴
4
コードの修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,11 +14,17 @@
|
|
14
14
|
|
15
15
|
```エラー
|
16
16
|
|
17
|
-
Exception in thread "Thread
|
17
|
+
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
|
18
|
-
|
18
|
+
|
19
|
-
at finalProject$MyRunnable.run(finalProject.java:
|
19
|
+
at finalProject$MyRunnable.lambda$run$0(finalProject.java:88)
|
20
|
+
|
20
|
-
|
21
|
+
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(PlatformImpl.java:418)
|
22
|
+
|
21
|
-
at java.base/java.
|
23
|
+
at java.base/java.security.AccessController.doPrivileged(Native Method)
|
24
|
+
|
25
|
+
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:417)
|
26
|
+
|
27
|
+
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
|
22
28
|
|
23
29
|
```
|
24
30
|
|
@@ -52,7 +58,9 @@
|
|
52
58
|
|
53
59
|
System.out.println(min+":"+sec);
|
54
60
|
|
61
|
+
Platform.runLater(
|
62
|
+
|
55
|
-
|
63
|
+
() -> lbTime.setText(min+":"+sec));
|
56
64
|
|
57
65
|
try{
|
58
66
|
|
@@ -260,7 +268,9 @@
|
|
260
268
|
|
261
269
|
System.out.println(min+":"+sec);
|
262
270
|
|
271
|
+
Platform.runLater(
|
272
|
+
|
263
|
-
|
273
|
+
() -> lbTime.setText(min+":"+sec));
|
264
274
|
|
265
275
|
try{
|
266
276
|
|
3
加筆
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,6 +6,8 @@
|
|
6
6
|
|
7
7
|
`lbTime.setText(min+":"+sec);`の部分で以下のエラーが出ています。
|
8
8
|
|
9
|
+
アドバイス頂ければ幸いです。
|
10
|
+
|
9
11
|
よろしくお願い致します。
|
10
12
|
|
11
13
|
|
2
コードの修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -38,8 +38,6 @@
|
|
38
38
|
|
39
39
|
{
|
40
40
|
|
41
|
-
Label lbTime = new Label();
|
42
|
-
|
43
41
|
while(true)
|
44
42
|
|
45
43
|
{
|
@@ -248,8 +246,6 @@
|
|
248
246
|
|
249
247
|
{
|
250
248
|
|
251
|
-
Label lbTime = new Label();
|
252
|
-
|
253
249
|
while(true)
|
254
250
|
|
255
251
|
{
|
1
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Threadを使っ
|
1
|
+
Threadを使ってLabelを更新したい。
|
test
CHANGED
File without changes
|