質問編集履歴

3

修正

2020/09/28 07:26

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  javafx.fxml.LoadException: No controller specified.
14
14
 
15
- /D:/JAVA/KANRIMENU/bin/application/KanriF5.fxml:16
15
+ /D:/JAVA/MENU/bin/application/KanriF5.fxml:16
16
16
 
17
17
 
18
18
 
@@ -34,7 +34,7 @@
34
34
 
35
35
  /**
36
36
 
37
- * "KANRIMENU.fxml"コントローラ・クラスのサンプル・スケルトン
37
+ * "MENU.fxml"コントローラ・クラスのサンプル・スケルトン
38
38
 
39
39
  */
40
40
 
@@ -76,7 +76,7 @@
76
76
 
77
77
 
78
78
 
79
- public class KANRIMENUController {
79
+ public class MENUController {
80
80
 
81
81
 
82
82
 
@@ -98,119 +98,193 @@
98
98
 
99
99
 
100
100
 
101
+
102
+
101
- @FXML // fx:id="buttonF3"
103
+ @FXML // fx:id="buttonEsc"
102
-
104
+
103
- private ToggleButton buttonF3; // Value injected by FXMLLoader
105
+ private ToggleButton buttonEsc; // Value injected by FXMLLoader
106
+
107
+
108
+
109
+ @FXML
110
+
111
+ void On_buttonEscClick(ActionEvent event) {
112
+
113
+
114
+
115
+ }
116
+
117
+
118
+
119
+ @FXML
120
+
121
+ void On_buttonF2Click(ActionEvent event) {
122
+
123
+
124
+
125
+ }
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+ @FXML // This method is called by the FXMLLoader when initialization is complete
134
+
135
+ void initialize() {
136
+
137
+ assert buttonF2 != null : "fx:id=\"buttonF2\" was not injected: check your FXML file 'MENU.fxml'.";
138
+
139
+ assert buttonEsc != null : "fx:id=\"buttonEsc\" was not injected: check your FXML file 'MENU.fxml'.";
140
+
141
+
142
+
143
+ }
144
+
145
+ }
146
+
147
+
148
+
149
+ ```
150
+
151
+
152
+
153
+ ### 該当のソースコード
154
+
155
+
156
+
157
+ ``` java
158
+
159
+ /**
160
+
161
+ * "KanriF5.fxml"コントローラ・クラスのサンプル・スケルトン
162
+
163
+ */
164
+
165
+ package application;
166
+
167
+
168
+
169
+ import java.io.IOException;
170
+
171
+ import java.net.URL;
172
+
173
+ import java.util.ResourceBundle;
174
+
175
+
176
+
177
+ import javafx.event.ActionEvent;
178
+
179
+ import javafx.fxml.FXML;
180
+
181
+ import javafx.fxml.FXMLLoader;
182
+
183
+ import javafx.scene.Node;
184
+
185
+ import javafx.scene.Parent;
186
+
187
+ import javafx.scene.Scene;
188
+
189
+ import javafx.scene.control.Button;
190
+
191
+ import javafx.stage.Stage;
192
+
193
+ import javafx.stage.Window;
194
+
195
+
196
+
197
+ public class aub {
198
+
199
+
200
+
201
+ @FXML // ResourceBundle that was given to the FXMLLoader
202
+
203
+ private ResourceBundle resources;
204
+
205
+
206
+
207
+ @FXML // URL location of the FXML file that was given to the FXMLLoader
208
+
209
+ private URL location;
104
210
 
105
211
 
106
212
 
107
213
  @FXML // fx:id="buttonF4"
108
214
 
109
- private ToggleButton buttonF4; // Value injected by FXMLLoader
215
+ private Button buttonF4; // Value injected by FXMLLoader
110
-
111
-
112
-
113
- @FXML // fx:id="buttonF5"
114
-
115
- private ToggleButton buttonF5; // Value injected by FXMLLoader
116
216
 
117
217
 
118
218
 
119
219
  @FXML // fx:id="buttonEsc"
120
220
 
121
- private ToggleButton buttonEsc; // Value injected by FXMLLoader
221
+ private Button buttonEsc; // Value injected by FXMLLoader
122
-
123
-
222
+
223
+
224
+
225
+
226
+
227
+
124
228
 
125
229
  @FXML
126
230
 
127
- void On_buttonEscClick(ActionEvent event) { //終了ボタン
231
+ void On_buttonEscClick_sub(ActionEvent event) {
232
+
233
+
234
+
128
-
235
+ /*
236
+
129
-
237
+ * 現在表示されている画面を閉じる
238
+
130
-
239
+ */
240
+
241
+ Scene s = ((Node)event.getSource()).getScene();
242
+
243
+ Window window = s.getWindow();
244
+
245
+ window.hide();
246
+
247
+
248
+
249
+ /*
250
+
251
+ * 新しい画面を生成する
252
+
253
+ */
254
+
255
+ try {
256
+
257
+ Parent parent = FXMLLoader.load(getClass().getResource("MENU.fxml"));
258
+
259
+ Scene scene = new Scene(parent);
260
+
261
+ Stage stage = new Stage();
262
+
263
+ stage.setScene(scene);
264
+
265
+ stage.setTitle("メニュー");
266
+
267
+ stage.show();
268
+
269
+ }catch(IOException e) {
270
+
271
+ e.printStackTrace();
272
+
131
- }
273
+ }
274
+
275
+ }
276
+
277
+
132
278
 
133
279
 
134
280
 
135
281
  @FXML
136
282
 
137
- void On_buttonF2Click(ActionEvent event) { //入荷検品
283
+ void On_buttonF4Click_kanri(ActionEvent event) {
138
-
139
-
140
-
284
+
285
+
286
+
141
- }
287
+ }
142
-
143
-
144
-
145
- @FXML
146
-
147
- void On_buttonF3Click(ActionEvent event) { //出荷検品
148
-
149
-
150
-
151
- }
152
-
153
-
154
-
155
- @FXML
156
-
157
- void On_buttonF4Click(ActionEvent event) { //進捗状況
158
-
159
-
160
-
161
- }
162
-
163
-
164
-
165
-
166
-
167
- @FXML
168
-
169
- void On_buttonF5Click(ActionEvent event) { //管理
170
-
171
- /*
172
-
173
- * 現在表示されている画面を閉じる
174
-
175
- */
176
-
177
- Scene s = ((Node)event.getSource()).getScene();
178
-
179
- Window window = s.getWindow();
180
-
181
- window.hide();
182
-
183
-
184
-
185
- /*
186
-
187
- * 新しい画面を生成する
188
-
189
- */
190
-
191
- try {
192
-
193
- Parent parent = FXMLLoader.load(getClass().getResource("KanriF5.fxml"));
194
-
195
- Scene scene = new Scene(parent);
196
-
197
- Stage stage = new Stage();
198
-
199
- stage.setScene(scene);
200
-
201
- stage.setTitle("管理メニュー");
202
-
203
- stage.show();
204
-
205
- }catch(IOException e) {
206
-
207
- e.printStackTrace();
208
-
209
- }
210
-
211
- }
212
-
213
-
214
288
 
215
289
 
216
290
 
@@ -218,15 +292,9 @@
218
292
 
219
293
  void initialize() {
220
294
 
221
- assert buttonF2 != null : "fx:id=\"buttonF2\" was not injected: check your FXML file 'KANRIMENU.fxml'.";
222
-
223
- assert buttonF3 != null : "fx:id=\"buttonF3\" was not injected: check your FXML file 'KANRIMENU.fxml'.";
224
-
225
- assert buttonF4 != null : "fx:id=\"buttonF4\" was not injected: check your FXML file 'KANRIMENU.fxml'.";
295
+ assert buttonF4 != null : "fx:id=\"buttonF4\" was not injected: check your FXML file 'sub.fxml'.";
226
-
227
- assert buttonF5 != null : "fx:id=\"buttonF5\" was not injected: check your FXML file 'KANRIMENU.fxml'.";
296
+
228
-
229
- assert buttonEsc != null : "fx:id=\"buttonEsc\" was not injected: check your FXML file 'KANRIMENU.fxml'.";
297
+ assert buttonEsc != null : "fx:id=\"buttonEsc\" was not injected: check your FXML file 'sub.fxml'.";
230
298
 
231
299
 
232
300
 
@@ -238,164 +306,6 @@
238
306
 
239
307
  ```
240
308
 
241
-
242
-
243
- ### 該当のソースコード
244
-
245
-
246
-
247
- ``` java
248
-
249
- /**
250
-
251
- * "KanriF5.fxml"コントローラ・クラスのサンプル・スケルトン
252
-
253
- */
254
-
255
- package application;
256
-
257
-
258
-
259
- import java.io.IOException;
260
-
261
- import java.net.URL;
262
-
263
- import java.util.ResourceBundle;
264
-
265
-
266
-
267
- import javafx.event.ActionEvent;
268
-
269
- import javafx.fxml.FXML;
270
-
271
- import javafx.fxml.FXMLLoader;
272
-
273
- import javafx.scene.Node;
274
-
275
- import javafx.scene.Parent;
276
-
277
- import javafx.scene.Scene;
278
-
279
- import javafx.scene.control.Button;
280
-
281
- import javafx.stage.Stage;
282
-
283
- import javafx.stage.Window;
284
-
285
-
286
-
287
- public class KanriF5 {
288
-
289
-
290
-
291
- @FXML // ResourceBundle that was given to the FXMLLoader
292
-
293
- private ResourceBundle resources;
294
-
295
-
296
-
297
- @FXML // URL location of the FXML file that was given to the FXMLLoader
298
-
299
- private URL location;
300
-
301
-
302
-
303
- @FXML // fx:id="buttonF4_kanri"
304
-
305
- private Button buttonF4_kanri; // Value injected by FXMLLoader
306
-
307
-
308
-
309
- @FXML // fx:id="buttonEsc_kanri"
310
-
311
- private Button buttonEsc_kanri; // Value injected by FXMLLoader
312
-
313
-
314
-
315
-
316
-
317
-
318
-
319
- @FXML
320
-
321
- void On_buttonEscClick_kanri(ActionEvent event) {
322
-
323
-
324
-
325
- /*
326
-
327
- * 現在表示されている画面を閉じる
328
-
329
- */
330
-
331
- Scene s = ((Node)event.getSource()).getScene();
332
-
333
- Window window = s.getWindow();
334
-
335
- window.hide();
336
-
337
-
338
-
339
- /*
340
-
341
- * 新しい画面を生成する
342
-
343
- */
344
-
345
- try {
346
-
347
- Parent parent = FXMLLoader.load(getClass().getResource("KANRIMENU.fxml"));
348
-
349
- Scene scene = new Scene(parent);
350
-
351
- Stage stage = new Stage();
352
-
353
- stage.setScene(scene);
354
-
355
- stage.setTitle("メインメニュー");
356
-
357
- stage.show();
358
-
359
- }catch(IOException e) {
360
-
361
- e.printStackTrace();
362
-
363
- }
364
-
365
- }
366
-
367
-
368
-
369
-
370
-
371
- @FXML
372
-
373
- void On_buttonF4Click_kanri(ActionEvent event) {
374
-
375
-
376
-
377
- }
378
-
379
-
380
-
381
- @FXML // This method is called by the FXMLLoader when initialization is complete
382
-
383
- void initialize() {
384
-
385
- assert buttonF4_kanri != null : "fx:id=\"buttonF4_kanri\" was not injected: check your FXML file 'KanriF5.fxml'.";
386
-
387
- assert buttonEsc_kanri != null : "fx:id=\"buttonEsc_kanri\" was not injected: check your FXML file 'KanriF5.fxml'.";
388
-
389
-
390
-
391
- }
392
-
393
- }
394
-
395
-
396
-
397
- ```
398
-
399
309
  ### わからないこと
400
310
 
401
311
  javafx.fxml.LoadException: No controller specified.

2

修正

2020/09/28 07:26

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -16,11 +16,225 @@
16
16
 
17
17
 
18
18
 
19
+ 文字数が入りきらないので以下省略
20
+
21
+ ```
22
+
23
+
24
+
19
25
  起動はできますが、メインメニューのF5を押すとコンソールに上記がでます。
20
26
 
21
27
 
22
28
 
29
+ ### 該当のソースコード
30
+
31
+
32
+
33
+ ``` java
34
+
35
+ /**
36
+
37
+ * "KANRIMENU.fxml"コントローラ・クラスのサンプル・スケルトン
38
+
39
+ */
40
+
41
+
42
+
43
+ package application;
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+ import java.io.IOException;
52
+
53
+ import java.net.URL;
54
+
55
+ import java.util.ResourceBundle;
56
+
57
+
58
+
59
+ import javafx.event.ActionEvent;
60
+
61
+ import javafx.fxml.FXML;
62
+
63
+ import javafx.fxml.FXMLLoader;
64
+
65
+ import javafx.scene.Node;
66
+
67
+ import javafx.scene.Parent;
68
+
69
+ import javafx.scene.Scene;
70
+
71
+ import javafx.scene.control.ToggleButton;
72
+
73
+ import javafx.stage.Stage;
74
+
75
+ import javafx.stage.Window;
76
+
77
+
78
+
79
+ public class KANRIMENUController {
80
+
81
+
82
+
83
+ @FXML // ResourceBundle that was given to the FXMLLoader
84
+
85
+ private ResourceBundle resources;
86
+
87
+
88
+
89
+ @FXML // URL location of the FXML file that was given to the FXMLLoader
90
+
91
+ private URL location;
92
+
93
+
94
+
95
+ @FXML // fx:id="buttonF2"
96
+
97
+ private ToggleButton buttonF2; // Value injected by FXMLLoader
98
+
99
+
100
+
101
+ @FXML // fx:id="buttonF3"
102
+
103
+ private ToggleButton buttonF3; // Value injected by FXMLLoader
104
+
105
+
106
+
107
+ @FXML // fx:id="buttonF4"
108
+
109
+ private ToggleButton buttonF4; // Value injected by FXMLLoader
110
+
111
+
112
+
113
+ @FXML // fx:id="buttonF5"
114
+
115
+ private ToggleButton buttonF5; // Value injected by FXMLLoader
116
+
117
+
118
+
119
+ @FXML // fx:id="buttonEsc"
120
+
121
+ private ToggleButton buttonEsc; // Value injected by FXMLLoader
122
+
123
+
124
+
125
+ @FXML
126
+
127
+ void On_buttonEscClick(ActionEvent event) { //終了ボタン
128
+
129
+
130
+
131
+ }
132
+
133
+
134
+
135
+ @FXML
136
+
137
+ void On_buttonF2Click(ActionEvent event) { //入荷検品
138
+
139
+
140
+
141
+ }
142
+
143
+
144
+
145
+ @FXML
146
+
147
+ void On_buttonF3Click(ActionEvent event) { //出荷検品
148
+
149
+
150
+
151
+ }
152
+
153
+
154
+
155
+ @FXML
156
+
157
+ void On_buttonF4Click(ActionEvent event) { //進捗状況
158
+
159
+
160
+
161
+ }
162
+
163
+
164
+
165
+
166
+
167
+ @FXML
168
+
169
+ void On_buttonF5Click(ActionEvent event) { //管理
170
+
171
+ /*
172
+
23
- 文字数が入りきらなので以下省略
173
+ * 現在表示されてる画面を閉じる
174
+
175
+ */
176
+
177
+ Scene s = ((Node)event.getSource()).getScene();
178
+
179
+ Window window = s.getWindow();
180
+
181
+ window.hide();
182
+
183
+
184
+
185
+ /*
186
+
187
+ * 新しい画面を生成する
188
+
189
+ */
190
+
191
+ try {
192
+
193
+ Parent parent = FXMLLoader.load(getClass().getResource("KanriF5.fxml"));
194
+
195
+ Scene scene = new Scene(parent);
196
+
197
+ Stage stage = new Stage();
198
+
199
+ stage.setScene(scene);
200
+
201
+ stage.setTitle("管理メニュー");
202
+
203
+ stage.show();
204
+
205
+ }catch(IOException e) {
206
+
207
+ e.printStackTrace();
208
+
209
+ }
210
+
211
+ }
212
+
213
+
214
+
215
+
216
+
217
+ @FXML // This method is called by the FXMLLoader when initialization is complete
218
+
219
+ void initialize() {
220
+
221
+ assert buttonF2 != null : "fx:id=\"buttonF2\" was not injected: check your FXML file 'KANRIMENU.fxml'.";
222
+
223
+ assert buttonF3 != null : "fx:id=\"buttonF3\" was not injected: check your FXML file 'KANRIMENU.fxml'.";
224
+
225
+ assert buttonF4 != null : "fx:id=\"buttonF4\" was not injected: check your FXML file 'KANRIMENU.fxml'.";
226
+
227
+ assert buttonF5 != null : "fx:id=\"buttonF5\" was not injected: check your FXML file 'KANRIMENU.fxml'.";
228
+
229
+ assert buttonEsc != null : "fx:id=\"buttonEsc\" was not injected: check your FXML file 'KANRIMENU.fxml'.";
230
+
231
+
232
+
233
+ }
234
+
235
+ }
236
+
237
+
24
238
 
25
239
  ```
26
240
 
@@ -34,20 +248,14 @@
34
248
 
35
249
  /**
36
250
 
37
- * "KANRIMENU.fxml"コントローラ・クラスのサンプル・スケルトン
251
+ * "KanriF5.fxml"コントローラ・クラスのサンプル・スケルトン
38
252
 
39
253
  */
40
254
 
41
-
42
-
43
255
  package application;
44
256
 
45
257
 
46
258
 
47
-
48
-
49
-
50
-
51
259
  import java.io.IOException;
52
260
 
53
261
  import java.net.URL;
@@ -68,7 +276,7 @@
68
276
 
69
277
  import javafx.scene.Scene;
70
278
 
71
- import javafx.scene.control.ToggleButton;
279
+ import javafx.scene.control.Button;
72
280
 
73
281
  import javafx.stage.Stage;
74
282
 
@@ -76,7 +284,7 @@
76
284
 
77
285
 
78
286
 
79
- public class KANRIMENUController {
287
+ public class KanriF5 {
80
288
 
81
289
 
82
290
 
@@ -92,105 +300,51 @@
92
300
 
93
301
 
94
302
 
95
- @FXML // fx:id="buttonF2"
96
-
97
- private ToggleButton buttonF2; // Value injected by FXMLLoader
98
-
99
-
100
-
101
- @FXML // fx:id="buttonF3"
102
-
103
- private ToggleButton buttonF3; // Value injected by FXMLLoader
104
-
105
-
106
-
107
- @FXML // fx:id="buttonF4"
303
+ @FXML // fx:id="buttonF4_kanri"
108
-
304
+
109
- private ToggleButton buttonF4; // Value injected by FXMLLoader
305
+ private Button buttonF4_kanri; // Value injected by FXMLLoader
110
-
111
-
112
-
113
- @FXML // fx:id="buttonF5"
306
+
114
-
115
- private ToggleButton buttonF5; // Value injected by FXMLLoader
307
+
116
-
117
-
118
-
308
+
119
- @FXML // fx:id="buttonEsc"
309
+ @FXML // fx:id="buttonEsc_kanri"
120
-
310
+
121
- private ToggleButton buttonEsc; // Value injected by FXMLLoader
311
+ private Button buttonEsc_kanri; // Value injected by FXMLLoader
122
-
123
-
124
-
312
+
313
+
314
+
315
+
316
+
317
+
318
+
125
- @FXML
319
+ @FXML
126
-
320
+
127
- void On_buttonEscClick(ActionEvent event) { //終了ボタン
321
+ void On_buttonEscClick_kanri(ActionEvent event) {
128
-
129
-
130
-
131
- }
322
+
132
-
133
-
134
-
135
- @FXML
323
+
136
-
137
- void On_buttonF2Click(ActionEvent event) { //入荷検品
138
-
139
-
140
-
141
- }
142
-
143
-
144
-
145
- @FXML
146
-
147
- void On_buttonF3Click(ActionEvent event) { //出荷検品
148
-
149
-
150
-
151
- }
152
-
153
-
154
-
155
- @FXML
156
-
157
- void On_buttonF4Click(ActionEvent event) { //進捗状況
158
-
159
-
160
-
161
- }
162
-
163
-
164
-
165
-
166
-
167
- @FXML
168
-
169
- void On_buttonF5Click(ActionEvent event) { //管理
170
324
 
171
325
  /*
172
326
 
173
- * 現在表示されている画面を閉じる
327
+ * 現在表示されている画面を閉じる
328
+
329
+ */
330
+
331
+ Scene s = ((Node)event.getSource()).getScene();
332
+
333
+ Window window = s.getWindow();
334
+
335
+ window.hide();
336
+
337
+
338
+
339
+ /*
340
+
341
+ * 新しい画面を生成する
174
342
 
175
343
  */
176
344
 
177
- Scene s = ((Node)event.getSource()).getScene();
178
-
179
- Window window = s.getWindow();
180
-
181
- window.hide();
182
-
183
-
184
-
185
- /*
186
-
187
- * 新しい画面を生成する
188
-
189
- */
190
-
191
345
  try {
192
346
 
193
- Parent parent = FXMLLoader.load(getClass().getResource("KanriF5.fxml"));
347
+ Parent parent = FXMLLoader.load(getClass().getResource("KANRIMENU.fxml"));
194
348
 
195
349
  Scene scene = new Scene(parent);
196
350
 
@@ -198,7 +352,7 @@
198
352
 
199
353
  stage.setScene(scene);
200
354
 
201
- stage.setTitle("管理メニュー");
355
+ stage.setTitle("メインメニュー");
202
356
 
203
357
  stage.show();
204
358
 
@@ -214,19 +368,23 @@
214
368
 
215
369
 
216
370
 
371
+ @FXML
372
+
373
+ void On_buttonF4Click_kanri(ActionEvent event) {
374
+
375
+
376
+
377
+ }
378
+
379
+
380
+
217
381
  @FXML // This method is called by the FXMLLoader when initialization is complete
218
382
 
219
383
  void initialize() {
220
384
 
221
- assert buttonF2 != null : "fx:id=\"buttonF2\" was not injected: check your FXML file 'KANRIMENU.fxml'.";
222
-
223
- assert buttonF3 != null : "fx:id=\"buttonF3\" was not injected: check your FXML file 'KANRIMENU.fxml'.";
224
-
225
- assert buttonF4 != null : "fx:id=\"buttonF4\" was not injected: check your FXML file 'KANRIMENU.fxml'.";
385
+ assert buttonF4_kanri != null : "fx:id=\"buttonF4_kanri\" was not injected: check your FXML file 'KanriF5.fxml'.";
226
-
227
- assert buttonF5 != null : "fx:id=\"buttonF5\" was not injected: check your FXML file 'KANRIMENU.fxml'.";
386
+
228
-
229
- assert buttonEsc != null : "fx:id=\"buttonEsc\" was not injected: check your FXML file 'KANRIMENU.fxml'.";
387
+ assert buttonEsc_kanri != null : "fx:id=\"buttonEsc_kanri\" was not injected: check your FXML file 'KanriF5.fxml'.";
230
388
 
231
389
 
232
390
 
@@ -238,164 +396,6 @@
238
396
 
239
397
  ```
240
398
 
241
-
242
-
243
- ### 該当のソースコード
244
-
245
-
246
-
247
- ``` java
248
-
249
- /**
250
-
251
- * "KanriF5.fxml"コントローラ・クラスのサンプル・スケルトン
252
-
253
- */
254
-
255
- package application;
256
-
257
-
258
-
259
- import java.io.IOException;
260
-
261
- import java.net.URL;
262
-
263
- import java.util.ResourceBundle;
264
-
265
-
266
-
267
- import javafx.event.ActionEvent;
268
-
269
- import javafx.fxml.FXML;
270
-
271
- import javafx.fxml.FXMLLoader;
272
-
273
- import javafx.scene.Node;
274
-
275
- import javafx.scene.Parent;
276
-
277
- import javafx.scene.Scene;
278
-
279
- import javafx.scene.control.Button;
280
-
281
- import javafx.stage.Stage;
282
-
283
- import javafx.stage.Window;
284
-
285
-
286
-
287
- public class KanriF5 {
288
-
289
-
290
-
291
- @FXML // ResourceBundle that was given to the FXMLLoader
292
-
293
- private ResourceBundle resources;
294
-
295
-
296
-
297
- @FXML // URL location of the FXML file that was given to the FXMLLoader
298
-
299
- private URL location;
300
-
301
-
302
-
303
- @FXML // fx:id="buttonF4_kanri"
304
-
305
- private Button buttonF4_kanri; // Value injected by FXMLLoader
306
-
307
-
308
-
309
- @FXML // fx:id="buttonEsc_kanri"
310
-
311
- private Button buttonEsc_kanri; // Value injected by FXMLLoader
312
-
313
-
314
-
315
-
316
-
317
-
318
-
319
- @FXML
320
-
321
- void On_buttonEscClick_kanri(ActionEvent event) {
322
-
323
-
324
-
325
- /*
326
-
327
- * 現在表示されている画面を閉じる
328
-
329
- */
330
-
331
- Scene s = ((Node)event.getSource()).getScene();
332
-
333
- Window window = s.getWindow();
334
-
335
- window.hide();
336
-
337
-
338
-
339
- /*
340
-
341
- * 新しい画面を生成する
342
-
343
- */
344
-
345
- try {
346
-
347
- Parent parent = FXMLLoader.load(getClass().getResource("KANRIMENU.fxml"));
348
-
349
- Scene scene = new Scene(parent);
350
-
351
- Stage stage = new Stage();
352
-
353
- stage.setScene(scene);
354
-
355
- stage.setTitle("メインメニュー");
356
-
357
- stage.show();
358
-
359
- }catch(IOException e) {
360
-
361
- e.printStackTrace();
362
-
363
- }
364
-
365
- }
366
-
367
-
368
-
369
-
370
-
371
- @FXML
372
-
373
- void On_buttonF4Click_kanri(ActionEvent event) {
374
-
375
-
376
-
377
- }
378
-
379
-
380
-
381
- @FXML // This method is called by the FXMLLoader when initialization is complete
382
-
383
- void initialize() {
384
-
385
- assert buttonF4_kanri != null : "fx:id=\"buttonF4_kanri\" was not injected: check your FXML file 'KanriF5.fxml'.";
386
-
387
- assert buttonEsc_kanri != null : "fx:id=\"buttonEsc_kanri\" was not injected: check your FXML file 'KanriF5.fxml'.";
388
-
389
-
390
-
391
- }
392
-
393
- }
394
-
395
-
396
-
397
- ```
398
-
399
399
  ### わからないこと
400
400
 
401
401
  javafx.fxml.LoadException: No controller specified.

1

修正

2020/08/25 06:33

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -16,6 +16,10 @@
16
16
 
17
17
 
18
18
 
19
+ 起動はできますが、メインメニューのF5を押すとコンソールに上記がでます。
20
+
21
+
22
+
19
23
  文字数が入りきらないので以下省略
20
24
 
21
25
  ```