質問編集履歴
2
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -431,3 +431,13 @@
|
|
431
431
|
}
|
432
432
|
|
433
433
|
```
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
追記
|
438
|
+
|
439
|
+
---
|
440
|
+
|
441
|
+

|
442
|
+
|
443
|
+
ここからどうすればよろしいですか?
|
1
ソース追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -11,3 +11,423 @@
|
|
11
11
|
Eclipseを少しいじってしまいました。
|
12
12
|
|
13
13
|
それが原因ですか?
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
ソースです
|
18
|
+
|
19
|
+
```java
|
20
|
+
|
21
|
+
/**
|
22
|
+
|
23
|
+
* Example of components laid out in a grid
|
24
|
+
|
25
|
+
*/
|
26
|
+
|
27
|
+
public class BasicSwingComponents extends javax.swing.JFrame{
|
28
|
+
|
29
|
+
private javax.swing.JButton ivjJButton1 = null;
|
30
|
+
|
31
|
+
private javax.swing.JCheckBox ivjJCheckBox1 = null;
|
32
|
+
|
33
|
+
private javax.swing.JComboBox ivjJComboBox1 = null;
|
34
|
+
|
35
|
+
private javax.swing.JPanel ivjJFrameContentPane = null;
|
36
|
+
|
37
|
+
private javax.swing.JLabel ivjJLabel1 = null;
|
38
|
+
|
39
|
+
private javax.swing.JPasswordField ivjJPasswordField1 = null;
|
40
|
+
|
41
|
+
private javax.swing.JProgressBar ivjJProgressBar1 = null;
|
42
|
+
|
43
|
+
private javax.swing.JRadioButton ivjJRadioButton1 = null;
|
44
|
+
|
45
|
+
private javax.swing.JScrollBar ivjJScrollBar1 = null;
|
46
|
+
|
47
|
+
private javax.swing.JSlider ivjJSlider1 = null;
|
48
|
+
|
49
|
+
private javax.swing.JTextArea ivjJTextArea1 = null;
|
50
|
+
|
51
|
+
private javax.swing.JTextField ivjJTextField1 = null;
|
52
|
+
|
53
|
+
private javax.swing.JToggleButton ivjJToggleButton1 = null;
|
54
|
+
|
55
|
+
public BasicSwingComponents() {
|
56
|
+
|
57
|
+
super();
|
58
|
+
|
59
|
+
initialize();
|
60
|
+
|
61
|
+
}
|
62
|
+
|
63
|
+
/**
|
64
|
+
|
65
|
+
* Return the JButton1 property value.
|
66
|
+
|
67
|
+
* @return javax.swing.JButton
|
68
|
+
|
69
|
+
*/
|
70
|
+
|
71
|
+
private javax.swing.JButton getJButton1() {
|
72
|
+
|
73
|
+
if ( ivjJButton1 == null ) {
|
74
|
+
|
75
|
+
ivjJButton1 = new javax.swing.JButton();
|
76
|
+
|
77
|
+
ivjJButton1.setName("JButton1");
|
78
|
+
|
79
|
+
ivjJButton1.setText("JButton");
|
80
|
+
|
81
|
+
}
|
82
|
+
|
83
|
+
return ivjJButton1;
|
84
|
+
|
85
|
+
}
|
86
|
+
|
87
|
+
/**
|
88
|
+
|
89
|
+
* Return the JCheckBox1 property value.
|
90
|
+
|
91
|
+
* @return javax.swing.JCheckBox
|
92
|
+
|
93
|
+
*/
|
94
|
+
|
95
|
+
private javax.swing.JCheckBox getJCheckBox1() {
|
96
|
+
|
97
|
+
if (ivjJCheckBox1 == null) {
|
98
|
+
|
99
|
+
ivjJCheckBox1 = new javax.swing.JCheckBox();
|
100
|
+
|
101
|
+
ivjJCheckBox1.setName("JCheckBox1");
|
102
|
+
|
103
|
+
ivjJCheckBox1.setText("JCheckBox");
|
104
|
+
|
105
|
+
}
|
106
|
+
|
107
|
+
return ivjJCheckBox1;
|
108
|
+
|
109
|
+
}
|
110
|
+
|
111
|
+
/**
|
112
|
+
|
113
|
+
* Return the JComboBox1 property value.
|
114
|
+
|
115
|
+
* @return javax.swing.JComboBox
|
116
|
+
|
117
|
+
*/
|
118
|
+
|
119
|
+
private javax.swing.JComboBox getJComboBox1() {
|
120
|
+
|
121
|
+
if (ivjJComboBox1 == null) {
|
122
|
+
|
123
|
+
ivjJComboBox1 = new javax.swing.JComboBox();
|
124
|
+
|
125
|
+
ivjJComboBox1.setName("JComboBox1");
|
126
|
+
|
127
|
+
}
|
128
|
+
|
129
|
+
return ivjJComboBox1;
|
130
|
+
|
131
|
+
}
|
132
|
+
|
133
|
+
/**
|
134
|
+
|
135
|
+
* Return the JFrameContentPane property value.
|
136
|
+
|
137
|
+
* @return javax.swing.JPanel
|
138
|
+
|
139
|
+
*/
|
140
|
+
|
141
|
+
private javax.swing.JPanel getJFrameContentPane() {
|
142
|
+
|
143
|
+
if (ivjJFrameContentPane == null) {
|
144
|
+
|
145
|
+
ivjJFrameContentPane = new javax.swing.JPanel();
|
146
|
+
|
147
|
+
ivjJFrameContentPane.setName("JFrameContentPane");
|
148
|
+
|
149
|
+
ivjJFrameContentPane.setLayout(new java.awt.FlowLayout());
|
150
|
+
|
151
|
+
getJFrameContentPane().add(getJButton1(), getJButton1().getName());
|
152
|
+
|
153
|
+
getJFrameContentPane().add(getJCheckBox1(), getJCheckBox1().getName());
|
154
|
+
|
155
|
+
getJFrameContentPane().add(getJRadioButton1(), getJRadioButton1().getName());
|
156
|
+
|
157
|
+
getJFrameContentPane().add(getJToggleButton1(), getJToggleButton1().getName());
|
158
|
+
|
159
|
+
getJFrameContentPane().add(getJLabel1(), getJLabel1().getName());
|
160
|
+
|
161
|
+
getJFrameContentPane().add(getJTextField1(), getJTextField1().getName());
|
162
|
+
|
163
|
+
getJFrameContentPane().add(getJPasswordField1(), getJPasswordField1().getName());
|
164
|
+
|
165
|
+
getJFrameContentPane().add(getJTextArea1(), getJTextArea1().getName());
|
166
|
+
|
167
|
+
getJFrameContentPane().add(getJSlider1(), getJSlider1().getName());
|
168
|
+
|
169
|
+
getJFrameContentPane().add(getJScrollBar1(), getJScrollBar1().getName());
|
170
|
+
|
171
|
+
getJFrameContentPane().add(getJComboBox1(), getJComboBox1().getName());
|
172
|
+
|
173
|
+
getJFrameContentPane().add(getJProgressBar1(), getJProgressBar1().getName());
|
174
|
+
|
175
|
+
}
|
176
|
+
|
177
|
+
return ivjJFrameContentPane;
|
178
|
+
|
179
|
+
}
|
180
|
+
|
181
|
+
/**
|
182
|
+
|
183
|
+
* Return the JLabel1 property value.
|
184
|
+
|
185
|
+
* @return javax.swing.JLabel
|
186
|
+
|
187
|
+
*/
|
188
|
+
|
189
|
+
private javax.swing.JLabel getJLabel1() {
|
190
|
+
|
191
|
+
if (ivjJLabel1 == null) {
|
192
|
+
|
193
|
+
ivjJLabel1 = new javax.swing.JLabel();
|
194
|
+
|
195
|
+
ivjJLabel1.setName("JLabel1");
|
196
|
+
|
197
|
+
ivjJLabel1.setText("JLabel");
|
198
|
+
|
199
|
+
}
|
200
|
+
|
201
|
+
return ivjJLabel1;
|
202
|
+
|
203
|
+
}
|
204
|
+
|
205
|
+
/**
|
206
|
+
|
207
|
+
* Return the JPasswordField1 property value.
|
208
|
+
|
209
|
+
* @return javax.swing.JPasswordField
|
210
|
+
|
211
|
+
*/
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
private javax.swing.JPasswordField getJPasswordField1() {
|
216
|
+
|
217
|
+
if (ivjJPasswordField1 == null) {
|
218
|
+
|
219
|
+
ivjJPasswordField1 = new javax.swing.JPasswordField();
|
220
|
+
|
221
|
+
ivjJPasswordField1.setName("JPasswordField1");
|
222
|
+
|
223
|
+
}
|
224
|
+
|
225
|
+
return ivjJPasswordField1;
|
226
|
+
|
227
|
+
}
|
228
|
+
|
229
|
+
/**
|
230
|
+
|
231
|
+
* Return the JProgressBar1 property value.
|
232
|
+
|
233
|
+
* @return javax.swing.JProgressBar
|
234
|
+
|
235
|
+
*/
|
236
|
+
|
237
|
+
private javax.swing.JProgressBar getJProgressBar1() {
|
238
|
+
|
239
|
+
if (ivjJProgressBar1 == null) {
|
240
|
+
|
241
|
+
ivjJProgressBar1 = new javax.swing.JProgressBar();
|
242
|
+
|
243
|
+
ivjJProgressBar1.setName("JProgressBar1");
|
244
|
+
|
245
|
+
ivjJProgressBar1.setValue(50);
|
246
|
+
|
247
|
+
}
|
248
|
+
|
249
|
+
return ivjJProgressBar1;
|
250
|
+
|
251
|
+
}
|
252
|
+
|
253
|
+
/**
|
254
|
+
|
255
|
+
* Return the JRadioButton1 property value.
|
256
|
+
|
257
|
+
* @return javax.swing.JRadioButton
|
258
|
+
|
259
|
+
*/
|
260
|
+
|
261
|
+
private javax.swing.JRadioButton getJRadioButton1() {
|
262
|
+
|
263
|
+
if (ivjJRadioButton1 == null) {
|
264
|
+
|
265
|
+
ivjJRadioButton1 = new javax.swing.JRadioButton();
|
266
|
+
|
267
|
+
ivjJRadioButton1.setName("JRadioButton1");
|
268
|
+
|
269
|
+
ivjJRadioButton1.setText("JRadioButton");
|
270
|
+
|
271
|
+
}
|
272
|
+
|
273
|
+
return ivjJRadioButton1;
|
274
|
+
|
275
|
+
}
|
276
|
+
|
277
|
+
/**
|
278
|
+
|
279
|
+
* Return the JScrollBar1 property value.
|
280
|
+
|
281
|
+
* @return javax.swing.JScrollBar
|
282
|
+
|
283
|
+
*/
|
284
|
+
|
285
|
+
private javax.swing.JScrollBar getJScrollBar1() {
|
286
|
+
|
287
|
+
if (ivjJScrollBar1 == null) {
|
288
|
+
|
289
|
+
ivjJScrollBar1 = new javax.swing.JScrollBar();
|
290
|
+
|
291
|
+
ivjJScrollBar1.setName("JScrollBar1");
|
292
|
+
|
293
|
+
}
|
294
|
+
|
295
|
+
return ivjJScrollBar1;
|
296
|
+
|
297
|
+
}
|
298
|
+
|
299
|
+
/**
|
300
|
+
|
301
|
+
* Return the JSlider1 property value.
|
302
|
+
|
303
|
+
* @return javax.swing.JSlider
|
304
|
+
|
305
|
+
*/
|
306
|
+
|
307
|
+
private javax.swing.JSlider getJSlider1() {
|
308
|
+
|
309
|
+
if (ivjJSlider1 == null) {
|
310
|
+
|
311
|
+
ivjJSlider1 = new javax.swing.JSlider();
|
312
|
+
|
313
|
+
ivjJSlider1.setName("JSlider1");
|
314
|
+
|
315
|
+
}
|
316
|
+
|
317
|
+
return ivjJSlider1;
|
318
|
+
|
319
|
+
}
|
320
|
+
|
321
|
+
/**
|
322
|
+
|
323
|
+
* Return the JTextArea1 property value.
|
324
|
+
|
325
|
+
* @return javax.swing.JTextArea
|
326
|
+
|
327
|
+
*/
|
328
|
+
|
329
|
+
private javax.swing.JTextArea getJTextArea1() {
|
330
|
+
|
331
|
+
if (ivjJTextArea1 == null) {
|
332
|
+
|
333
|
+
ivjJTextArea1 = new javax.swing.JTextArea();
|
334
|
+
|
335
|
+
ivjJTextArea1.setName("JTextArea1");
|
336
|
+
|
337
|
+
ivjJTextArea1.setRows(3);
|
338
|
+
|
339
|
+
ivjJTextArea1.setColumns(7);
|
340
|
+
|
341
|
+
}
|
342
|
+
|
343
|
+
return ivjJTextArea1;
|
344
|
+
|
345
|
+
}
|
346
|
+
|
347
|
+
/**
|
348
|
+
|
349
|
+
* Return the JTextField1 property value.
|
350
|
+
|
351
|
+
* @return javax.swing.JTextField
|
352
|
+
|
353
|
+
*/
|
354
|
+
|
355
|
+
private javax.swing.JTextField getJTextField1() {
|
356
|
+
|
357
|
+
if (ivjJTextField1 == null) {
|
358
|
+
|
359
|
+
ivjJTextField1 = new javax.swing.JTextField();
|
360
|
+
|
361
|
+
ivjJTextField1.setName("JTextField1");
|
362
|
+
|
363
|
+
ivjJTextField1.setText("JTextField");
|
364
|
+
|
365
|
+
}
|
366
|
+
|
367
|
+
return ivjJTextField1;
|
368
|
+
|
369
|
+
}
|
370
|
+
|
371
|
+
/**
|
372
|
+
|
373
|
+
* Return the JToggleButton1 property value.
|
374
|
+
|
375
|
+
* @return javax.swing.JToggleButton
|
376
|
+
|
377
|
+
*/
|
378
|
+
|
379
|
+
private javax.swing.JToggleButton getJToggleButton1() {
|
380
|
+
|
381
|
+
if (ivjJToggleButton1 == null) {
|
382
|
+
|
383
|
+
ivjJToggleButton1 = new javax.swing.JToggleButton();
|
384
|
+
|
385
|
+
ivjJToggleButton1.setName("JToggleButton1");
|
386
|
+
|
387
|
+
ivjJToggleButton1.setText("JToggleButton");
|
388
|
+
|
389
|
+
}
|
390
|
+
|
391
|
+
return ivjJToggleButton1;
|
392
|
+
|
393
|
+
}
|
394
|
+
|
395
|
+
/**
|
396
|
+
|
397
|
+
* Initialize the class.
|
398
|
+
|
399
|
+
*/
|
400
|
+
|
401
|
+
private void initialize() {
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
this.setName("JFrame1");
|
406
|
+
|
407
|
+
this.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
408
|
+
|
409
|
+
this.setBounds(45, 25, 317, 273);
|
410
|
+
|
411
|
+
this.setTitle("BasicSwingComponents");
|
412
|
+
|
413
|
+
this.setContentPane(getJFrameContentPane());
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
}
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
public static void main(String argv[]) {
|
422
|
+
|
423
|
+
BasicSwingComponents instance = new BasicSwingComponents();
|
424
|
+
|
425
|
+
instance.initialize();
|
426
|
+
|
427
|
+
instance.setVisible(true);
|
428
|
+
|
429
|
+
}
|
430
|
+
|
431
|
+
}
|
432
|
+
|
433
|
+
```
|