import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.util.logging.Logger;
import javax.swing.Box;
-import javax.swing.BoxLayout;
import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.JFrame;
private JTabbedPane projectPane;
/** The project overview panel. */
- private Box projectOverviewPanel;
+ private JPanel projectOverviewPanel;
/** Maps from node to menus. */
private final Map<Node, JMenu> nodeMenus = new HashMap<Node, JMenu>();
projectPane = new JTabbedPane(SwingConstants.TOP, JTabbedPane.SCROLL_TAB_LAYOUT);
contentPane.add(projectPane, BorderLayout.CENTER);
- projectOverviewPanel = new Box(BoxLayout.PAGE_AXIS);
+ projectOverviewPanel = new JPanel(new GridBagLayout());
projectOverviewPanel.setName(I18n.get("mainWindow.pane.overview.title"));
projectPane.add(projectOverviewPanel);
projectOverviewPanel.setBorder(new EmptyBorder(12, 12, 12, 12));
- projectOverviewPanel.add(Box.createVerticalGlue());
JButton addProjectButton = new JButton(swingInterface.getAddProjectAction());
- addProjectButton.setAlignmentX(0.5f);
- projectOverviewPanel.add(addProjectButton);
- projectOverviewPanel.add(Box.createVerticalGlue());
+ projectOverviewPanel.add(addProjectButton, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
}
//