質問するログイン新規登録

質問編集履歴

2

追記

2016/01/23 11:18

投稿

makoto-n
makoto-n

スコア436

title CHANGED
File without changes
body CHANGED
@@ -214,4 +214,9 @@
214
214
  instance.setVisible(true);
215
215
  }
216
216
  }
217
- ```
217
+ ```
218
+
219
+ 追記
220
+ ---
221
+ ![実行の興成](d4c003c9b4e9b86676491f01b6c95f8c.png)
222
+ ここからどうすればよろしいですか?

1

ソース追記

2016/01/23 11:17

投稿

makoto-n
makoto-n

スコア436

title CHANGED
File without changes
body CHANGED
@@ -4,4 +4,214 @@
4
4
  「メイン型が含まれていません」とはどういうことですか?
5
5
 
6
6
  Eclipseを少しいじってしまいました。
7
- それが原因ですか?
7
+ それが原因ですか?
8
+
9
+ ソースです
10
+ ```java
11
+ /**
12
+ * Example of components laid out in a grid
13
+ */
14
+ public class BasicSwingComponents extends javax.swing.JFrame{
15
+ private javax.swing.JButton ivjJButton1 = null;
16
+ private javax.swing.JCheckBox ivjJCheckBox1 = null;
17
+ private javax.swing.JComboBox ivjJComboBox1 = null;
18
+ private javax.swing.JPanel ivjJFrameContentPane = null;
19
+ private javax.swing.JLabel ivjJLabel1 = null;
20
+ private javax.swing.JPasswordField ivjJPasswordField1 = null;
21
+ private javax.swing.JProgressBar ivjJProgressBar1 = null;
22
+ private javax.swing.JRadioButton ivjJRadioButton1 = null;
23
+ private javax.swing.JScrollBar ivjJScrollBar1 = null;
24
+ private javax.swing.JSlider ivjJSlider1 = null;
25
+ private javax.swing.JTextArea ivjJTextArea1 = null;
26
+ private javax.swing.JTextField ivjJTextField1 = null;
27
+ private javax.swing.JToggleButton ivjJToggleButton1 = null;
28
+ public BasicSwingComponents() {
29
+ super();
30
+ initialize();
31
+ }
32
+ /**
33
+ * Return the JButton1 property value.
34
+ * @return javax.swing.JButton
35
+ */
36
+ private javax.swing.JButton getJButton1() {
37
+ if ( ivjJButton1 == null ) {
38
+ ivjJButton1 = new javax.swing.JButton();
39
+ ivjJButton1.setName("JButton1");
40
+ ivjJButton1.setText("JButton");
41
+ }
42
+ return ivjJButton1;
43
+ }
44
+ /**
45
+ * Return the JCheckBox1 property value.
46
+ * @return javax.swing.JCheckBox
47
+ */
48
+ private javax.swing.JCheckBox getJCheckBox1() {
49
+ if (ivjJCheckBox1 == null) {
50
+ ivjJCheckBox1 = new javax.swing.JCheckBox();
51
+ ivjJCheckBox1.setName("JCheckBox1");
52
+ ivjJCheckBox1.setText("JCheckBox");
53
+ }
54
+ return ivjJCheckBox1;
55
+ }
56
+ /**
57
+ * Return the JComboBox1 property value.
58
+ * @return javax.swing.JComboBox
59
+ */
60
+ private javax.swing.JComboBox getJComboBox1() {
61
+ if (ivjJComboBox1 == null) {
62
+ ivjJComboBox1 = new javax.swing.JComboBox();
63
+ ivjJComboBox1.setName("JComboBox1");
64
+ }
65
+ return ivjJComboBox1;
66
+ }
67
+ /**
68
+ * Return the JFrameContentPane property value.
69
+ * @return javax.swing.JPanel
70
+ */
71
+ private javax.swing.JPanel getJFrameContentPane() {
72
+ if (ivjJFrameContentPane == null) {
73
+ ivjJFrameContentPane = new javax.swing.JPanel();
74
+ ivjJFrameContentPane.setName("JFrameContentPane");
75
+ ivjJFrameContentPane.setLayout(new java.awt.FlowLayout());
76
+ getJFrameContentPane().add(getJButton1(), getJButton1().getName());
77
+ getJFrameContentPane().add(getJCheckBox1(), getJCheckBox1().getName());
78
+ getJFrameContentPane().add(getJRadioButton1(), getJRadioButton1().getName());
79
+ getJFrameContentPane().add(getJToggleButton1(), getJToggleButton1().getName());
80
+ getJFrameContentPane().add(getJLabel1(), getJLabel1().getName());
81
+ getJFrameContentPane().add(getJTextField1(), getJTextField1().getName());
82
+ getJFrameContentPane().add(getJPasswordField1(), getJPasswordField1().getName());
83
+ getJFrameContentPane().add(getJTextArea1(), getJTextArea1().getName());
84
+ getJFrameContentPane().add(getJSlider1(), getJSlider1().getName());
85
+ getJFrameContentPane().add(getJScrollBar1(), getJScrollBar1().getName());
86
+ getJFrameContentPane().add(getJComboBox1(), getJComboBox1().getName());
87
+ getJFrameContentPane().add(getJProgressBar1(), getJProgressBar1().getName());
88
+ }
89
+ return ivjJFrameContentPane;
90
+ }
91
+ /**
92
+ * Return the JLabel1 property value.
93
+ * @return javax.swing.JLabel
94
+ */
95
+ private javax.swing.JLabel getJLabel1() {
96
+ if (ivjJLabel1 == null) {
97
+ ivjJLabel1 = new javax.swing.JLabel();
98
+ ivjJLabel1.setName("JLabel1");
99
+ ivjJLabel1.setText("JLabel");
100
+ }
101
+ return ivjJLabel1;
102
+ }
103
+ /**
104
+ * Return the JPasswordField1 property value.
105
+ * @return javax.swing.JPasswordField
106
+ */
107
+
108
+ private javax.swing.JPasswordField getJPasswordField1() {
109
+ if (ivjJPasswordField1 == null) {
110
+ ivjJPasswordField1 = new javax.swing.JPasswordField();
111
+ ivjJPasswordField1.setName("JPasswordField1");
112
+ }
113
+ return ivjJPasswordField1;
114
+ }
115
+ /**
116
+ * Return the JProgressBar1 property value.
117
+ * @return javax.swing.JProgressBar
118
+ */
119
+ private javax.swing.JProgressBar getJProgressBar1() {
120
+ if (ivjJProgressBar1 == null) {
121
+ ivjJProgressBar1 = new javax.swing.JProgressBar();
122
+ ivjJProgressBar1.setName("JProgressBar1");
123
+ ivjJProgressBar1.setValue(50);
124
+ }
125
+ return ivjJProgressBar1;
126
+ }
127
+ /**
128
+ * Return the JRadioButton1 property value.
129
+ * @return javax.swing.JRadioButton
130
+ */
131
+ private javax.swing.JRadioButton getJRadioButton1() {
132
+ if (ivjJRadioButton1 == null) {
133
+ ivjJRadioButton1 = new javax.swing.JRadioButton();
134
+ ivjJRadioButton1.setName("JRadioButton1");
135
+ ivjJRadioButton1.setText("JRadioButton");
136
+ }
137
+ return ivjJRadioButton1;
138
+ }
139
+ /**
140
+ * Return the JScrollBar1 property value.
141
+ * @return javax.swing.JScrollBar
142
+ */
143
+ private javax.swing.JScrollBar getJScrollBar1() {
144
+ if (ivjJScrollBar1 == null) {
145
+ ivjJScrollBar1 = new javax.swing.JScrollBar();
146
+ ivjJScrollBar1.setName("JScrollBar1");
147
+ }
148
+ return ivjJScrollBar1;
149
+ }
150
+ /**
151
+ * Return the JSlider1 property value.
152
+ * @return javax.swing.JSlider
153
+ */
154
+ private javax.swing.JSlider getJSlider1() {
155
+ if (ivjJSlider1 == null) {
156
+ ivjJSlider1 = new javax.swing.JSlider();
157
+ ivjJSlider1.setName("JSlider1");
158
+ }
159
+ return ivjJSlider1;
160
+ }
161
+ /**
162
+ * Return the JTextArea1 property value.
163
+ * @return javax.swing.JTextArea
164
+ */
165
+ private javax.swing.JTextArea getJTextArea1() {
166
+ if (ivjJTextArea1 == null) {
167
+ ivjJTextArea1 = new javax.swing.JTextArea();
168
+ ivjJTextArea1.setName("JTextArea1");
169
+ ivjJTextArea1.setRows(3);
170
+ ivjJTextArea1.setColumns(7);
171
+ }
172
+ return ivjJTextArea1;
173
+ }
174
+ /**
175
+ * Return the JTextField1 property value.
176
+ * @return javax.swing.JTextField
177
+ */
178
+ private javax.swing.JTextField getJTextField1() {
179
+ if (ivjJTextField1 == null) {
180
+ ivjJTextField1 = new javax.swing.JTextField();
181
+ ivjJTextField1.setName("JTextField1");
182
+ ivjJTextField1.setText("JTextField");
183
+ }
184
+ return ivjJTextField1;
185
+ }
186
+ /**
187
+ * Return the JToggleButton1 property value.
188
+ * @return javax.swing.JToggleButton
189
+ */
190
+ private javax.swing.JToggleButton getJToggleButton1() {
191
+ if (ivjJToggleButton1 == null) {
192
+ ivjJToggleButton1 = new javax.swing.JToggleButton();
193
+ ivjJToggleButton1.setName("JToggleButton1");
194
+ ivjJToggleButton1.setText("JToggleButton");
195
+ }
196
+ return ivjJToggleButton1;
197
+ }
198
+ /**
199
+ * Initialize the class.
200
+ */
201
+ private void initialize() {
202
+
203
+ this.setName("JFrame1");
204
+ this.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
205
+ this.setBounds(45, 25, 317, 273);
206
+ this.setTitle("BasicSwingComponents");
207
+ this.setContentPane(getJFrameContentPane());
208
+
209
+ }
210
+
211
+ public static void main(String argv[]) {
212
+ BasicSwingComponents instance = new BasicSwingComponents();
213
+ instance.initialize();
214
+ instance.setVisible(true);
215
+ }
216
+ }
217
+ ```