OSDN Git Service

AboutDialogのデフォルトボタンを設定.
authorspark_xp <spark_xp@d8c9ecd3-d47d-4367-8645-de82c00e513f>
Tue, 14 Sep 2010 17:58:57 +0000 (17:58 +0000)
committerspark_xp <spark_xp@d8c9ecd3-d47d-4367-8645-de82c00e513f>
Tue, 14 Sep 2010 17:58:57 +0000 (17:58 +0000)
AccountDialogのデフォルトボタンを設定.
AccountDialogのニーモニック設定.

git-svn-id: http://svn.sourceforge.jp/svnroot/nt-manager/NishioTweetManager/trunk@34 d8c9ecd3-d47d-4367-8645-de82c00e513f

src/twitter/gui/form/AboutDialog.java
src/twitter/gui/form/AccountDialog.form
src/twitter/gui/form/AccountDialog.java

index df71f9a..18b8d13 100644 (file)
@@ -23,6 +23,9 @@ public class AboutDialog extends javax.swing.JDialog {
     public AboutDialog(java.awt.Frame parent, boolean modal) {
         super(parent, modal);
         initComponents();
+
+        //デフォルトボタン
+        this.getRootPane().setDefaultButton(jButton1);
     }
 
     /** This method is called from within the constructor to
index c2cf092..f87f68d 100644 (file)
     </Component>
     <Component class="javax.swing.JButton" name="jButton1">
       <Properties>
-        <Property name="text" type="java.lang.String" value="&#x30ed;&#x30b0;&#x30a4;&#x30f3;"/>
+        <Property name="mnemonic" type="int" value="76"/>
+        <Property name="text" type="java.lang.String" value="&#x30ed;&#x30b0;&#x30a4;&#x30f3;(L)"/>
       </Properties>
       <Events>
         <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
index 1667a8c..065ff4d 100644 (file)
@@ -32,6 +32,9 @@ public class AccountDialog extends javax.swing.JDialog {
         initComponents();
         this.mainAction = mainAction;
         this.tweetManager = tweetManager;
+
+        //デフォルトボタン
+        this.getRootPane().setDefaultButton(jButton1);
     }
 
     private TweetMainAction mainAction = null;
@@ -71,7 +74,8 @@ public class AccountDialog extends javax.swing.JDialog {
 
         jLabel4.setText("パスワード");
 
-        jButton1.setText("ログイン");
+        jButton1.setMnemonic('L');
+        jButton1.setText("ログイン(L)");
         jButton1.addActionListener(new java.awt.event.ActionListener() {
             public void actionPerformed(java.awt.event.ActionEvent evt) {
                 jButton1ActionPerformed(evt);