package net.pterodactylus.jkeytool.gui.swing;
+import java.awt.BorderLayout;
import java.io.File;
import java.security.KeyStore;
import java.util.HashMap;
import java.util.Map;
+import javax.swing.BorderFactory;
+import javax.swing.JComponent;
import javax.swing.JFrame;
+import javax.swing.JPanel;
+import javax.swing.JTabbedPane;
import net.pterodactylus.jkeytool.core.Core;
import net.pterodactylus.jkeytool.gui.Interface;
/** The main frame. */
private JFrame mainFrame = new JFrame("jkeytool " + Main.getVersion());
+ /** The tab pane. */
+ private JTabbedPane tabPane = new JTabbedPane();
+
/** The status bar. */
private StatusBar statusBar = new StatusBar();
//
private void createFrame() {
+ mainFrame.getContentPane().add(createCenterPanel(), BorderLayout.CENTER);
mainFrame.getContentPane().add(statusBar, BorderLayout.PAGE_END);
mainFrame.pack();
}
+ private JComponent createCenterPanel() {
+ JPanel centerPanel = new JPanel(new BorderLayout());
+ centerPanel.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6));
+
+ centerPanel.add(tabPane, BorderLayout.CENTER);
+
+ return centerPanel;
+ }
+
//
// INTERFACE Interface
//
public void keyStoreLoaded(File keyStoreFile, KeyStore keyStore) {
KeyStorePanel keyStorePanel = new KeyStorePanel(keyStore);
keyStores.put(keyStore, keyStorePanel);
+ tabPane.addTab(keyStoreFile.getName(), keyStorePanel);
}
/**