回答編集履歴
1
オリジナルのコンボボックスのリスナは意図したものでは無かったようなので普通(?)に修正
answer
CHANGED
@@ -152,16 +152,14 @@
|
|
152
152
|
add(homeButton);
|
153
153
|
|
154
154
|
JComboBox<String> buyinCombo = new JComboBox<String>(buyin);
|
155
|
-
buyinCombo.
|
155
|
+
buyinCombo.addActionListener(new ActionListener() {
|
156
156
|
@Override
|
157
|
-
public void
|
157
|
+
public void actionPerformed(ActionEvent e) {
|
158
|
-
if (e.getStateChange() == 1) {
|
159
|
-
|
158
|
+
String str = ((String)buyinCombo.getSelectedItem()).replace("$", "");
|
160
|
-
|
159
|
+
int v = Integer.parseInt(str);
|
161
|
-
|
160
|
+
if(buyinListener != null && v != stack) {
|
162
|
-
|
161
|
+
stack = v;
|
163
|
-
|
162
|
+
buyinListener.changeBuyin(stack);
|
164
|
-
}
|
165
163
|
}
|
166
164
|
}
|
167
165
|
});
|