Pack window after creation.
[jkeytool.git] / src / net / pterodactylus / jkeytool / gui / MainFrame.java
index b6bda71..cfbccee 100644 (file)
@@ -74,6 +74,7 @@ public class MainFrame implements CoreListener, WindowListener {
                constructActions();
                mainFrame.setJMenuBar(constructMenuBar());
                mainFrame.addWindowListener(this);
+               mainFrame.pack();
        }
 
        //
@@ -163,6 +164,20 @@ public class MainFrame implements CoreListener, WindowListener {
        /**
         * {@inheritDoc}
         */
+       public void keyStoreCreated(KeyStore keyStore) {
+               /* TODO */
+       }
+
+       /**
+        * {@inheritDoc}
+        */
+       public void keyStoreNotCreated(String keyStoreType, Throwable reason) {
+               JOptionPane.showMessageDialog(mainFrame, "Could not create a key store of type “" + keyStoreType + "”.", "Could Not Create Key Store", JOptionPane.ERROR_MESSAGE);
+       }
+
+       /**
+        * {@inheritDoc}
+        */
        public void keyStoreLoaded(File keyStoreFile, KeyStore keyStore) {
                /* TODO - create keystore frame. */
        }