質問編集履歴

2

コードが長すぎたので、削除しました。

2019/07/12 07:25

投稿

kaiko
kaiko

スコア12

test CHANGED
File without changes
test CHANGED
@@ -1,4 +1,4 @@
1
- java 8 を使用しています。
1
+ Windows8 、java 8 を使用しています。
2
2
 
3
3
  Aの画面でボタン押下時、Bの画面を呼出してますが、
4
4
 
@@ -15,499 +15,3 @@
15
15
 
16
16
 
17
17
  初歩的な質問ですみませんが、回答よろしくお願いいたします。
18
-
19
-
20
-
21
- 【Aの画面です】
22
-
23
- import java.awt.event.ActionEvent;
24
-
25
- import java.awt.event.ActionListener;
26
-
27
- import java.awt.event.KeyEvent;
28
-
29
- import java.awt.event.KeyListener;
30
-
31
- import javax.swing.JButton;
32
-
33
- import javax.swing.JFrame;
34
-
35
- import javax.swing.JLabel;
36
-
37
- import javax.swing.JTextArea;
38
-
39
-
40
-
41
- public class Kzt_Aisatsu extends JFrame implements ActionListener,KeyListener {
42
-
43
- static JFrame frame;
44
-
45
- static JLabel Lbl_Tytle;
46
-
47
- static JTextArea Txt_Setsumei;
48
-
49
- static JButton Btn_Hyoji;
50
-
51
- static JButton Btn_Clear;
52
-
53
- static JButton Btn_End;
54
-
55
-
56
-
57
- ・・・(省略します)
58
-
59
-
60
-
61
- public void actionPerformed(ActionEvent e) {
62
-
63
-     // 表示ボタンが押されたときにテキストを表示する。
64
-
65
- if(e.getSource() == Btn_Clear){
66
-
67
- Err_Hyoji Hyoji = new Err_Hyoji("W002");
68
-
69
- Hyoji.setVisible(true);
70
-
71
- Txt_Setsumei.requestFocus();
72
-
73
- if(Err_Hyoji.w_kakunin == 1){
74
-
75
- Txt_Setsumei.setText("");
76
-
77
- Txt_Setsumei.requestFocus();
78
-
79
- }
80
-
81
- } else {
82
-
83
- System.exit(EXIT_ON_CLOSE);
84
-
85
- }
86
-
87
- }
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
- 【Bの画面】
96
-
97
- import java.awt.Color;
98
-
99
- import java.awt.event.ActionEvent;
100
-
101
- import java.awt.event.ActionListener;
102
-
103
- import java.sql.Connection;
104
-
105
- import java.sql.ResultSet;
106
-
107
- import java.sql.SQLException;
108
-
109
- import java.sql.Statement;
110
-
111
- import javax.swing.JLabel;
112
-
113
- import javax.swing.BorderFactory;
114
-
115
- import javax.swing.JButton;
116
-
117
- import javax.swing.JDialog;
118
-
119
- import javax.swing.JPanel;
120
-
121
- import javax.swing.JTextArea;
122
-
123
- import javax.swing.SwingConstants;
124
-
125
- import javax.swing.border.LineBorder;
126
-
127
- import javax.swing.JFrame;
128
-
129
- import javax.swing.JOptionPane;
130
-
131
- import javax.swing.UIManager;
132
-
133
-
134
-
135
- public class Err_Hyoji extends JDialog implements ActionListener {
136
-
137
-
138
-
139
- // 部品の宣言
140
-
141
- JLabel Lbl_Tytle, Lbl_ErrCode,Lbl_Naiyou;
142
-
143
- JButton Btn_Syosai, Btn_Yes, Btn_End;
144
-
145
- JPanel ErrPanel;
146
-
147
- private String err_code, w_syosai = null;
148
-
149
- public static int w_kakunin = 0;
150
-
151
-
152
-
153
- public void initComponents() {
154
-
155
- // 画面上に部品の配置を行う
156
-
157
- setTitle("");
158
-
159
- setDefaultCloseOperation(DISPOSE_ON_CLOSE);
160
-
161
- setLayout(null);
162
-
163
- setResizable(false);
164
-
165
-
166
-
167
- ErrPanel = new JPanel();
168
-
169
- ErrPanel.setLayout(null);
170
-
171
- ErrPanel.setBounds( 0, 0, 300, 200);
172
-
173
-
174
-
175
- Lbl_Tytle = new JLabel("");
176
-
177
- Lbl_Tytle.setBounds(20, 10, 60, 20);
178
-
179
- ErrPanel.add(Lbl_Tytle);
180
-
181
-
182
-
183
- Lbl_ErrCode = new JLabel("");
184
-
185
- Lbl_ErrCode.setBounds(100, 10, 50, 20);
186
-
187
- ErrPanel.add(Lbl_ErrCode);
188
-
189
-
190
-
191
- Lbl_Naiyou = new JLabel("");
192
-
193
- Lbl_Naiyou.setBounds(20, 40, 250, 100);
194
-
195
- Lbl_Naiyou.setBackground(Color.white);
196
-
197
- Lbl_Naiyou.setVerticalAlignment(SwingConstants.TOP);
198
-
199
- Lbl_Naiyou.setBorder(LineBorder.createBlackLineBorder());
200
-
201
- Lbl_Naiyou.setOpaque(true);
202
-
203
- ErrPanel.add(Lbl_Naiyou);
204
-
205
-
206
-
207
- Btn_Syosai = new JButton("詳細");
208
-
209
- Btn_Syosai.setBounds(70, 150, 90, 25);
210
-
211
- ErrPanel.add(Btn_Syosai);
212
-
213
-
214
-
215
- Btn_Yes = new JButton("はい");
216
-
217
- Btn_Yes.setBounds(70, 150, 90, 25);
218
-
219
- ErrPanel.add(Btn_Yes);
220
-
221
-
222
-
223
- Btn_End = new JButton("閉じる");
224
-
225
- Btn_End.setBounds(180, 150, 90, 25);
226
-
227
- ErrPanel.add(Btn_End);
228
-
229
-
230
-
231
- getContentPane().add(ErrPanel);
232
-
233
- setBounds(100, 150, 300, 210);
234
-
235
-
236
-
237
- Btn_Syosai.addActionListener(this);
238
-
239
- Btn_Yes.addActionListener(this);
240
-
241
- Btn_End.addActionListener(this);
242
-
243
-
244
-
245
- getData(err_code);
246
-
247
-
248
-
249
-
250
-
251
- if(w_syosai == null || w_syosai == ""){
252
-
253
- Btn_Syosai.setEnabled(false);
254
-
255
- setModal(true);
256
-
257
- } else {
258
-
259
- Btn_Syosai.setEnabled(true);
260
-
261
- setModal(false);
262
-
263
- }
264
-
265
- }
266
-
267
-
268
-
269
- public Err_Hyoji(String err_code) {
270
-
271
- this.err_code = err_code;
272
-
273
- initComponents();
274
-
275
- err_type(this.err_code);
276
-
277
- }
278
-
279
-
280
-
281
- public void actionPerformed(ActionEvent ae) {
282
-
283
- // 終了ボタン押下時
284
-
285
- if(ae.getSource().equals(Btn_End)) {
286
-
287
- // 閉じるボタンとか、いいえボタンとか押下時。
288
-
289
- w_kakunin = 0;
290
-
291
- dispose();
292
-
293
- } else if(ae.getSource().equals(Btn_Syosai)) {
294
-
295
- // 詳細ボタン押下時
296
-
297
- w_kakunin = 0;
298
-
299
- try {
300
-
301
- Err_Syosai Syosai = new Err_Syosai(w_syosai);
302
-
303
- Syosai.setVisible(true);
304
-
305
- } catch(Exception e) {
306
-
307
- e.printStackTrace();
308
-
309
- }
310
-
311
- } else if(ae.getSource().equals(Btn_Yes)) {
312
-
313
- // はいボタン押下時
314
-
315
- w_kakunin = 1;
316
-
317
- dispose();
318
-
319
- }
320
-
321
- }
322
-
323
-
324
-
325
- public void err_type(String err_codeID) {
326
-
327
- char w_moji = err_codeID.charAt(0);
328
-
329
- if(w_moji == 'E') {
330
-
331
- // 頭文字が"E"の場合、エラー画面を表示する。
332
-
333
- setTitle("エラー");
334
-
335
- Lbl_Tytle.setText("エラー:");
336
-
337
- Btn_End.setText("閉じる");
338
-
339
- Btn_Syosai.setVisible(true);
340
-
341
- Btn_Yes.setVisible(false);
342
-
343
- } else if(w_moji == 'W') {
344
-
345
- // 頭文字が"W"の場合、問合せ画面を表示する。
346
-
347
- setTitle("問合せ");
348
-
349
- Lbl_Tytle.setText("問合せ:");
350
-
351
- Btn_End.setText("いいえ");
352
-
353
- Btn_Syosai.setVisible(false);
354
-
355
- Btn_Yes.setVisible(true);
356
-
357
- } else if(w_moji == 'C') {
358
-
359
- // 頭文字が"W"の場合、問合せ画面を表示する。
360
-
361
- setTitle("警告");
362
-
363
- Lbl_Tytle.setText("警告:");
364
-
365
- Btn_End.setText("閉じる");
366
-
367
- Btn_Syosai.setVisible(false);
368
-
369
- Btn_Yes.setVisible(false);
370
-
371
- }
372
-
373
- }
374
-
375
-
376
-
377
- // データベースを接続して、エラーコードのようにデータがでる
378
-
379
- public void getData(String err_codeID) {
380
-
381
- int w_error = 0;
382
-
383
- ResultSet rs = null;
384
-
385
- Connection connection = null;
386
-
387
- Statement statement = null;
388
-
389
- String query = "SELECT * FROM error_msg WHERE err_code ='"+ err_codeID +"'";
390
-
391
- try {
392
-
393
- connection = JDBCMySQLConnection.getConnection();
394
-
395
- statement = connection.createStatement();
396
-
397
- // クエリを実行する
398
-
399
- rs = statement.executeQuery(query);
400
-
401
-
402
-
403
- if (rs.next()) {
404
-
405
- if(Integer.parseInt(rs.getString("err_hitkbn")) != 0) {
406
-
407
- //エラーコードが取消されている(err_hitkbn≠0)の場合、エラーコードE997を表示する
408
-
409
- this.err_code = "E997";
410
-
411
- getData(err_code);
412
-
413
- } else {
414
-
415
- Lbl_ErrCode.setText(rs.getString("err_code"));
416
-
417
- String msg = rs.getString("err_msg");
418
-
419
- String syosai = rs.getString("err_syosai");
420
-
421
- if(msg.length()> 19) {
422
-
423
- String firstmsg = msg.substring(0, 19);
424
-
425
- String secondmsg = msg.substring(19);
426
-
427
- String message = "<html>"+firstmsg+"<br/>"+secondmsg+"</html>";
428
-
429
- Lbl_Naiyou.setText(message);
430
-
431
- } else {
432
-
433
- Lbl_Naiyou.setText(msg);
434
-
435
- }
436
-
437
- if(syosai.length()> 22) {
438
-
439
- String firstdtl = syosai.substring(0, 22);
440
-
441
- String seconddtl = syosai.substring(22);
442
-
443
- String dtl = "<html>"+firstdtl+"<br/>"+seconddtl+"</html>";
444
-
445
- w_syosai = dtl;
446
-
447
- } else {
448
-
449
- w_syosai = syosai;
450
-
451
- }
452
-
453
- //Lbl_Naiyou.setText(rs.getString("err_msg"));
454
-
455
- //w_syosai = rs.getString("err_syosai");
456
-
457
-
458
-
459
- }
460
-
461
- }
462
-
463
- else {
464
-
465
- //エラーコードが存在しない場合、エラーコードE998を表示する
466
-
467
- this.err_code = "E998";
468
-
469
- getData(err_code);
470
-
471
- }
472
-
473
- } catch (SQLException e) {
474
-
475
- e.printStackTrace();
476
-
477
- //データベースにアクセスできない場合、固定文字を表示する
478
-
479
- this.err_code = "E999";
480
-
481
- Lbl_ErrCode.setText(this.err_code);
482
-
483
- Lbl_Naiyou.setText("アクセスエラーです");
484
-
485
- } finally {
486
-
487
- if (connection != null) {
488
-
489
- try {
490
-
491
- connection.close();
492
-
493
- } catch (SQLException e) {
494
-
495
- e.printStackTrace();
496
-
497
- }
498
-
499
- }
500
-
501
- }
502
-
503
- }
504
-
505
-
506
-
507
- public static void main(String[] args) {
508
-
509
- new Err_Hyoji(args[0]);
510
-
511
- }
512
-
513
- }

1

コードを追記しました。

2019/07/12 07:25

投稿

kaiko
kaiko

スコア12

test CHANGED
File without changes
test CHANGED
@@ -15,3 +15,499 @@
15
15
 
16
16
 
17
17
  初歩的な質問ですみませんが、回答よろしくお願いいたします。
18
+
19
+
20
+
21
+ 【Aの画面です】
22
+
23
+ import java.awt.event.ActionEvent;
24
+
25
+ import java.awt.event.ActionListener;
26
+
27
+ import java.awt.event.KeyEvent;
28
+
29
+ import java.awt.event.KeyListener;
30
+
31
+ import javax.swing.JButton;
32
+
33
+ import javax.swing.JFrame;
34
+
35
+ import javax.swing.JLabel;
36
+
37
+ import javax.swing.JTextArea;
38
+
39
+
40
+
41
+ public class Kzt_Aisatsu extends JFrame implements ActionListener,KeyListener {
42
+
43
+ static JFrame frame;
44
+
45
+ static JLabel Lbl_Tytle;
46
+
47
+ static JTextArea Txt_Setsumei;
48
+
49
+ static JButton Btn_Hyoji;
50
+
51
+ static JButton Btn_Clear;
52
+
53
+ static JButton Btn_End;
54
+
55
+
56
+
57
+ ・・・(省略します)
58
+
59
+
60
+
61
+ public void actionPerformed(ActionEvent e) {
62
+
63
+     // 表示ボタンが押されたときにテキストを表示する。
64
+
65
+ if(e.getSource() == Btn_Clear){
66
+
67
+ Err_Hyoji Hyoji = new Err_Hyoji("W002");
68
+
69
+ Hyoji.setVisible(true);
70
+
71
+ Txt_Setsumei.requestFocus();
72
+
73
+ if(Err_Hyoji.w_kakunin == 1){
74
+
75
+ Txt_Setsumei.setText("");
76
+
77
+ Txt_Setsumei.requestFocus();
78
+
79
+ }
80
+
81
+ } else {
82
+
83
+ System.exit(EXIT_ON_CLOSE);
84
+
85
+ }
86
+
87
+ }
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ 【Bの画面】
96
+
97
+ import java.awt.Color;
98
+
99
+ import java.awt.event.ActionEvent;
100
+
101
+ import java.awt.event.ActionListener;
102
+
103
+ import java.sql.Connection;
104
+
105
+ import java.sql.ResultSet;
106
+
107
+ import java.sql.SQLException;
108
+
109
+ import java.sql.Statement;
110
+
111
+ import javax.swing.JLabel;
112
+
113
+ import javax.swing.BorderFactory;
114
+
115
+ import javax.swing.JButton;
116
+
117
+ import javax.swing.JDialog;
118
+
119
+ import javax.swing.JPanel;
120
+
121
+ import javax.swing.JTextArea;
122
+
123
+ import javax.swing.SwingConstants;
124
+
125
+ import javax.swing.border.LineBorder;
126
+
127
+ import javax.swing.JFrame;
128
+
129
+ import javax.swing.JOptionPane;
130
+
131
+ import javax.swing.UIManager;
132
+
133
+
134
+
135
+ public class Err_Hyoji extends JDialog implements ActionListener {
136
+
137
+
138
+
139
+ // 部品の宣言
140
+
141
+ JLabel Lbl_Tytle, Lbl_ErrCode,Lbl_Naiyou;
142
+
143
+ JButton Btn_Syosai, Btn_Yes, Btn_End;
144
+
145
+ JPanel ErrPanel;
146
+
147
+ private String err_code, w_syosai = null;
148
+
149
+ public static int w_kakunin = 0;
150
+
151
+
152
+
153
+ public void initComponents() {
154
+
155
+ // 画面上に部品の配置を行う
156
+
157
+ setTitle("");
158
+
159
+ setDefaultCloseOperation(DISPOSE_ON_CLOSE);
160
+
161
+ setLayout(null);
162
+
163
+ setResizable(false);
164
+
165
+
166
+
167
+ ErrPanel = new JPanel();
168
+
169
+ ErrPanel.setLayout(null);
170
+
171
+ ErrPanel.setBounds( 0, 0, 300, 200);
172
+
173
+
174
+
175
+ Lbl_Tytle = new JLabel("");
176
+
177
+ Lbl_Tytle.setBounds(20, 10, 60, 20);
178
+
179
+ ErrPanel.add(Lbl_Tytle);
180
+
181
+
182
+
183
+ Lbl_ErrCode = new JLabel("");
184
+
185
+ Lbl_ErrCode.setBounds(100, 10, 50, 20);
186
+
187
+ ErrPanel.add(Lbl_ErrCode);
188
+
189
+
190
+
191
+ Lbl_Naiyou = new JLabel("");
192
+
193
+ Lbl_Naiyou.setBounds(20, 40, 250, 100);
194
+
195
+ Lbl_Naiyou.setBackground(Color.white);
196
+
197
+ Lbl_Naiyou.setVerticalAlignment(SwingConstants.TOP);
198
+
199
+ Lbl_Naiyou.setBorder(LineBorder.createBlackLineBorder());
200
+
201
+ Lbl_Naiyou.setOpaque(true);
202
+
203
+ ErrPanel.add(Lbl_Naiyou);
204
+
205
+
206
+
207
+ Btn_Syosai = new JButton("詳細");
208
+
209
+ Btn_Syosai.setBounds(70, 150, 90, 25);
210
+
211
+ ErrPanel.add(Btn_Syosai);
212
+
213
+
214
+
215
+ Btn_Yes = new JButton("はい");
216
+
217
+ Btn_Yes.setBounds(70, 150, 90, 25);
218
+
219
+ ErrPanel.add(Btn_Yes);
220
+
221
+
222
+
223
+ Btn_End = new JButton("閉じる");
224
+
225
+ Btn_End.setBounds(180, 150, 90, 25);
226
+
227
+ ErrPanel.add(Btn_End);
228
+
229
+
230
+
231
+ getContentPane().add(ErrPanel);
232
+
233
+ setBounds(100, 150, 300, 210);
234
+
235
+
236
+
237
+ Btn_Syosai.addActionListener(this);
238
+
239
+ Btn_Yes.addActionListener(this);
240
+
241
+ Btn_End.addActionListener(this);
242
+
243
+
244
+
245
+ getData(err_code);
246
+
247
+
248
+
249
+
250
+
251
+ if(w_syosai == null || w_syosai == ""){
252
+
253
+ Btn_Syosai.setEnabled(false);
254
+
255
+ setModal(true);
256
+
257
+ } else {
258
+
259
+ Btn_Syosai.setEnabled(true);
260
+
261
+ setModal(false);
262
+
263
+ }
264
+
265
+ }
266
+
267
+
268
+
269
+ public Err_Hyoji(String err_code) {
270
+
271
+ this.err_code = err_code;
272
+
273
+ initComponents();
274
+
275
+ err_type(this.err_code);
276
+
277
+ }
278
+
279
+
280
+
281
+ public void actionPerformed(ActionEvent ae) {
282
+
283
+ // 終了ボタン押下時
284
+
285
+ if(ae.getSource().equals(Btn_End)) {
286
+
287
+ // 閉じるボタンとか、いいえボタンとか押下時。
288
+
289
+ w_kakunin = 0;
290
+
291
+ dispose();
292
+
293
+ } else if(ae.getSource().equals(Btn_Syosai)) {
294
+
295
+ // 詳細ボタン押下時
296
+
297
+ w_kakunin = 0;
298
+
299
+ try {
300
+
301
+ Err_Syosai Syosai = new Err_Syosai(w_syosai);
302
+
303
+ Syosai.setVisible(true);
304
+
305
+ } catch(Exception e) {
306
+
307
+ e.printStackTrace();
308
+
309
+ }
310
+
311
+ } else if(ae.getSource().equals(Btn_Yes)) {
312
+
313
+ // はいボタン押下時
314
+
315
+ w_kakunin = 1;
316
+
317
+ dispose();
318
+
319
+ }
320
+
321
+ }
322
+
323
+
324
+
325
+ public void err_type(String err_codeID) {
326
+
327
+ char w_moji = err_codeID.charAt(0);
328
+
329
+ if(w_moji == 'E') {
330
+
331
+ // 頭文字が"E"の場合、エラー画面を表示する。
332
+
333
+ setTitle("エラー");
334
+
335
+ Lbl_Tytle.setText("エラー:");
336
+
337
+ Btn_End.setText("閉じる");
338
+
339
+ Btn_Syosai.setVisible(true);
340
+
341
+ Btn_Yes.setVisible(false);
342
+
343
+ } else if(w_moji == 'W') {
344
+
345
+ // 頭文字が"W"の場合、問合せ画面を表示する。
346
+
347
+ setTitle("問合せ");
348
+
349
+ Lbl_Tytle.setText("問合せ:");
350
+
351
+ Btn_End.setText("いいえ");
352
+
353
+ Btn_Syosai.setVisible(false);
354
+
355
+ Btn_Yes.setVisible(true);
356
+
357
+ } else if(w_moji == 'C') {
358
+
359
+ // 頭文字が"W"の場合、問合せ画面を表示する。
360
+
361
+ setTitle("警告");
362
+
363
+ Lbl_Tytle.setText("警告:");
364
+
365
+ Btn_End.setText("閉じる");
366
+
367
+ Btn_Syosai.setVisible(false);
368
+
369
+ Btn_Yes.setVisible(false);
370
+
371
+ }
372
+
373
+ }
374
+
375
+
376
+
377
+ // データベースを接続して、エラーコードのようにデータがでる
378
+
379
+ public void getData(String err_codeID) {
380
+
381
+ int w_error = 0;
382
+
383
+ ResultSet rs = null;
384
+
385
+ Connection connection = null;
386
+
387
+ Statement statement = null;
388
+
389
+ String query = "SELECT * FROM error_msg WHERE err_code ='"+ err_codeID +"'";
390
+
391
+ try {
392
+
393
+ connection = JDBCMySQLConnection.getConnection();
394
+
395
+ statement = connection.createStatement();
396
+
397
+ // クエリを実行する
398
+
399
+ rs = statement.executeQuery(query);
400
+
401
+
402
+
403
+ if (rs.next()) {
404
+
405
+ if(Integer.parseInt(rs.getString("err_hitkbn")) != 0) {
406
+
407
+ //エラーコードが取消されている(err_hitkbn≠0)の場合、エラーコードE997を表示する
408
+
409
+ this.err_code = "E997";
410
+
411
+ getData(err_code);
412
+
413
+ } else {
414
+
415
+ Lbl_ErrCode.setText(rs.getString("err_code"));
416
+
417
+ String msg = rs.getString("err_msg");
418
+
419
+ String syosai = rs.getString("err_syosai");
420
+
421
+ if(msg.length()> 19) {
422
+
423
+ String firstmsg = msg.substring(0, 19);
424
+
425
+ String secondmsg = msg.substring(19);
426
+
427
+ String message = "<html>"+firstmsg+"<br/>"+secondmsg+"</html>";
428
+
429
+ Lbl_Naiyou.setText(message);
430
+
431
+ } else {
432
+
433
+ Lbl_Naiyou.setText(msg);
434
+
435
+ }
436
+
437
+ if(syosai.length()> 22) {
438
+
439
+ String firstdtl = syosai.substring(0, 22);
440
+
441
+ String seconddtl = syosai.substring(22);
442
+
443
+ String dtl = "<html>"+firstdtl+"<br/>"+seconddtl+"</html>";
444
+
445
+ w_syosai = dtl;
446
+
447
+ } else {
448
+
449
+ w_syosai = syosai;
450
+
451
+ }
452
+
453
+ //Lbl_Naiyou.setText(rs.getString("err_msg"));
454
+
455
+ //w_syosai = rs.getString("err_syosai");
456
+
457
+
458
+
459
+ }
460
+
461
+ }
462
+
463
+ else {
464
+
465
+ //エラーコードが存在しない場合、エラーコードE998を表示する
466
+
467
+ this.err_code = "E998";
468
+
469
+ getData(err_code);
470
+
471
+ }
472
+
473
+ } catch (SQLException e) {
474
+
475
+ e.printStackTrace();
476
+
477
+ //データベースにアクセスできない場合、固定文字を表示する
478
+
479
+ this.err_code = "E999";
480
+
481
+ Lbl_ErrCode.setText(this.err_code);
482
+
483
+ Lbl_Naiyou.setText("アクセスエラーです");
484
+
485
+ } finally {
486
+
487
+ if (connection != null) {
488
+
489
+ try {
490
+
491
+ connection.close();
492
+
493
+ } catch (SQLException e) {
494
+
495
+ e.printStackTrace();
496
+
497
+ }
498
+
499
+ }
500
+
501
+ }
502
+
503
+ }
504
+
505
+
506
+
507
+ public static void main(String[] args) {
508
+
509
+ new Err_Hyoji(args[0]);
510
+
511
+ }
512
+
513
+ }