OSDN Git Service

コンフィグダイアログクローズ処理
authoryukihane <yukihane.feather@gmail.com>
Thu, 25 Aug 2011 21:11:22 +0000 (06:11 +0900)
committeryukihane <yukihane.feather@gmail.com>
Thu, 25 Aug 2011 21:11:22 +0000 (06:11 +0900)
frontend/src/yukihane/inqubus/gui/ConfigDialog.java

index e2f7838..9dbd0b6 100644 (file)
@@ -5,6 +5,9 @@
  */
 package yukihane.inqubus.gui;
 
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import javax.swing.BorderFactory;
@@ -1041,6 +1044,14 @@ public class ConfigDialog extends JDialog {
 
         final JPanel pnlButton = new JPanel();
         final JButton btnOk = new JButton("OK");
+        btnOk.addActionListener(new ActionListener() {
+
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                saveConfig();
+                dispose();
+            }
+        });
         final JButton btnCancel = new JButton("Cancel");
         pnlButton.add(btnOk);
         pnlButton.add(btnCancel);