java.awt.GridBagConstraints#REMAINDER源码实例Demo

下面列出了java.awt.GridBagConstraints#REMAINDER 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: dragonwell8_jdk   文件: ServiceDialog.java
public GeneralPanel() {
    super();

    GridBagLayout gridbag = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();

    setLayout(gridbag);

    c.fill = GridBagConstraints.BOTH;
    c.insets = panelInsets;
    c.weightx = 1.0;
    c.weighty = 1.0;

    c.gridwidth = GridBagConstraints.REMAINDER;
    pnlPrintService = new PrintServicePanel();
    addToGB(pnlPrintService, this, gridbag, c);

    c.gridwidth = GridBagConstraints.RELATIVE;
    pnlPrintRange = new PrintRangePanel();
    addToGB(pnlPrintRange, this, gridbag, c);

    c.gridwidth = GridBagConstraints.REMAINDER;
    pnlCopies = new CopiesPanel();
    addToGB(pnlCopies, this, gridbag, c);
}
 
源代码2 项目: TencentKona-8   文件: ServiceDialog.java
public QualityPanel() {
    super();

    GridBagLayout gridbag = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();

    setLayout(gridbag);
    setBorder(BorderFactory.createTitledBorder(strTitle));

    c.fill = GridBagConstraints.BOTH;
    c.gridwidth = GridBagConstraints.REMAINDER;
    c.weighty = 1.0;

    ButtonGroup bg = new ButtonGroup();
    rbDraft = createRadioButton("radiobutton.draftq", this);
    bg.add(rbDraft);
    addToGB(rbDraft, this, gridbag, c);
    rbNormal = createRadioButton("radiobutton.normalq", this);
    rbNormal.setSelected(true);
    bg.add(rbNormal);
    addToGB(rbNormal, this, gridbag, c);
    rbHigh = createRadioButton("radiobutton.highq", this);
    bg.add(rbHigh);
    addToGB(rbHigh, this, gridbag, c);
}
 
源代码3 项目: rapidminer-studio   文件: SimilarityTable.java
public SimilarityTable(DistanceMeasure measure, ExampleSet exampleSet) {
	GridBagLayout layout = new GridBagLayout();
	setLayout(layout);
	GridBagConstraints c = new GridBagConstraints();
	c.fill = GridBagConstraints.BOTH;
	c.weightx = 1;
	c.weighty = 1;
	c.gridwidth = GridBagConstraints.REMAINDER;

	similarityTable = new ExtendedJTable();
	SimilarityTableModel model = new SimilarityTableModel(measure, exampleSet);
	similarityTable.setModel(model);

	JScrollPane tablePane = new ExtendedJScrollPane(similarityTable);
	tablePane.setBorder(null);
	layout.setConstraints(tablePane, c);
	add(tablePane);
}
 
源代码4 项目: openjdk-jdk8u   文件: ServiceDialog.java
public GeneralPanel() {
    super();

    GridBagLayout gridbag = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();

    setLayout(gridbag);

    c.fill = GridBagConstraints.BOTH;
    c.insets = panelInsets;
    c.weightx = 1.0;
    c.weighty = 1.0;

    c.gridwidth = GridBagConstraints.REMAINDER;
    pnlPrintService = new PrintServicePanel();
    addToGB(pnlPrintService, this, gridbag, c);

    c.gridwidth = GridBagConstraints.RELATIVE;
    pnlPrintRange = new PrintRangePanel();
    addToGB(pnlPrintRange, this, gridbag, c);

    c.gridwidth = GridBagConstraints.REMAINDER;
    pnlCopies = new CopiesPanel();
    addToGB(pnlCopies, this, gridbag, c);
}
 
源代码5 项目: hottub   文件: ServiceDialog.java
public GeneralPanel() {
    super();

    GridBagLayout gridbag = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();

    setLayout(gridbag);

    c.fill = GridBagConstraints.BOTH;
    c.insets = panelInsets;
    c.weightx = 1.0;
    c.weighty = 1.0;

    c.gridwidth = GridBagConstraints.REMAINDER;
    pnlPrintService = new PrintServicePanel();
    addToGB(pnlPrintService, this, gridbag, c);

    c.gridwidth = GridBagConstraints.RELATIVE;
    pnlPrintRange = new PrintRangePanel();
    addToGB(pnlPrintRange, this, gridbag, c);

    c.gridwidth = GridBagConstraints.REMAINDER;
    pnlCopies = new CopiesPanel();
    addToGB(pnlCopies, this, gridbag, c);
}
 
源代码6 项目: megamek   文件: ClientDialog.java
/** 
 * Adds a row (line) with the two JComponents <code>label, secondC</code>
 * to the given <code>panel</code>, using constraints c. The label will be
 * right-aligned, the secondC left-aligned to bring them close together. 
 * Only useful for simple panels with GridBagLayout.
 */
protected void addOptionRow(JPanel targetP, GridBagConstraints c, JLabel label, Component secondC) {
    int oldGridW = c.gridwidth;
    int oldAnchor = c.anchor;
    
    c.gridwidth = 1;
    c.anchor = GridBagConstraints.EAST;
    targetP.add(label, c);
    
    c.gridwidth = GridBagConstraints.REMAINDER;
    c.anchor = GridBagConstraints.WEST;
    targetP.add(secondC, c);
    
    c.gridwidth = oldGridW;
    c.anchor = oldAnchor;
}
 
源代码7 项目: openjdk-8-source   文件: ServiceDialog.java
public MediaPanel() {
    super();

    GridBagLayout gridbag = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();

    setLayout(gridbag);
    setBorder(BorderFactory.createTitledBorder(strTitle));

    cbSize = new JComboBox();
    cbSource = new JComboBox();

    c.fill = GridBagConstraints.BOTH;
    c.insets = compInsets;
    c.weighty = 1.0;

    c.weightx = 0.0;
    lblSize = new JLabel(getMsg("label.size"), JLabel.TRAILING);
    lblSize.setDisplayedMnemonic(getMnemonic("label.size"));
    lblSize.setLabelFor(cbSize);
    addToGB(lblSize, this, gridbag, c);
    c.weightx = 1.0;
    c.gridwidth = GridBagConstraints.REMAINDER;
    addToGB(cbSize, this, gridbag, c);

    c.weightx = 0.0;
    c.gridwidth = 1;
    lblSource = new JLabel(getMsg("label.source"), JLabel.TRAILING);
    lblSource.setDisplayedMnemonic(getMnemonic("label.source"));
    lblSource.setLabelFor(cbSource);
    addToGB(lblSource, this, gridbag, c);
    c.gridwidth = GridBagConstraints.REMAINDER;
    addToGB(cbSource, this, gridbag, c);
}
 
源代码8 项目: dragonwell8_jdk   文件: ServiceDialog.java
private JLabel addLabel(String text,
                        GridBagLayout gridbag, GridBagConstraints c)
{
    c.gridwidth = 1;
    addToGB(new JLabel(text, JLabel.TRAILING), this, gridbag, c);

    c.gridwidth = GridBagConstraints.REMAINDER;
    JLabel label = new JLabel();
    addToGB(label, this, gridbag, c);

    return label;
}
 
源代码9 项目: pcgen   文件: SummaryInfoTab.java
private void initComponents()
{
	this.setFocusCycleRoot(true);
	this.setFocusTraversalPolicyProvider(true);
	this.setFocusTraversalPolicy(new SummaryTabFocusTraversalPolicy());

	LanguageTableModel.initializeTable(languageTable);

	setLayout(new GridBagLayout());
	GridBagConstraints gbc = new GridBagConstraints();

	setPanelTitle(basicsPanel, LanguageBundle.getString("in_sumCharacterBasics")); //$NON-NLS-1$
	basicsPanel.setLayout(new GridBagLayout());
	deityComboBox.setRenderer(infoBoxRenderer);
	raceComboBox.setRenderer(infoBoxRenderer);
	classComboBox.setRenderer(classBoxRenderer);
	gbc.fill = GridBagConstraints.BOTH;
	gbc.weightx = 0.1;
	gbc.weighty = 0.7;
	add(basicsPanel, gbc);

	setPanelTitle(todoPanel, LanguageBundle.getString("in_tipsString")); //$NON-NLS-1$
	initTodoPanel(todoPanel);
	gbc.gridy = 1;
	gbc.gridheight = GridBagConstraints.REMAINDER;
	add(todoPanel, gbc);

	initMiddlePanel(scoresPanel);
	gbc.gridy = GridBagConstraints.RELATIVE;
	gbc.weightx = 1;
	add(scoresPanel, gbc);

	JPanel rightPanel = new JPanel();
	setPanelTitle(racePanel, LanguageBundle.getString("in_raceString")); //$NON-NLS-1$
	setPanelTitle(classPanel, LanguageBundle.getString("in_sumClassLevel")); //$NON-NLS-1$
	initRightPanel(rightPanel);
	gbc.weightx = 0.1;
	gbc.weighty = 1;
	add(rightPanel, gbc);
}
 
源代码10 项目: Raccoon   文件: ListView.java
public ListView() {
	setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
	setLayout(new GridBagLayout());
	gbc = new GridBagConstraints();
	gbc.anchor = GridBagConstraints.CENTER;
	gbc.insets = new Insets(0, 0, 10, 0);
	gbc.fill = GridBagConstraints.HORIZONTAL;
	gbc.gridx = GridBagConstraints.REMAINDER;
	// We don't stretch aand depending on the LAF, the underlying container
	// might have a different color.
	setOpaque(false);
}
 
源代码11 项目: FancyBing   文件: ParameterDialog.java
public void createComponents(int gridy, JPanel panel,
                             GridBagLayout gridbag)
{
    m_checkBox = new JCheckBox(getLabel(), m_initialValue);
    GridBagConstraints constraints = new GridBagConstraints();
    constraints.gridx = 0;
    constraints.gridy = gridy;
    constraints.gridwidth = GridBagConstraints.REMAINDER;
    constraints.weightx = 1.0;
    constraints.anchor = GridBagConstraints.WEST;
    gridbag.setConstraints(m_checkBox, constraints);
    panel.add(m_checkBox);
}
 
源代码12 项目: jdk8u60   文件: ServiceDialog.java
public CopiesPanel() {
    super();

    GridBagLayout gridbag = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();

    setLayout(gridbag);
    setBorder(BorderFactory.createTitledBorder(strTitle));

    c.fill = GridBagConstraints.HORIZONTAL;
    c.insets = compInsets;

    lblCopies = new JLabel(getMsg("label.numcopies"), JLabel.TRAILING);
    lblCopies.setDisplayedMnemonic(getMnemonic("label.numcopies"));
    lblCopies.getAccessibleContext().setAccessibleName(
                                     getMsg("label.numcopies"));
    addToGB(lblCopies, this, gridbag, c);

    snModel = new SpinnerNumberModel(1, 1, 999, 1);
    spinCopies = new JSpinner(snModel);
    lblCopies.setLabelFor(spinCopies);
    // REMIND
    ((JSpinner.NumberEditor)spinCopies.getEditor()).getTextField().setColumns(3);
    spinCopies.addChangeListener(this);
    c.gridwidth = GridBagConstraints.REMAINDER;
    addToGB(spinCopies, this, gridbag, c);

    cbCollate = createCheckBox("checkbox.collate", this);
    cbCollate.setEnabled(false);
    addToGB(cbCollate, this, gridbag, c);
}
 
源代码13 项目: jdk8u-jdk   文件: ServiceDialog.java
public MediaPanel() {
    super();

    GridBagLayout gridbag = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();

    setLayout(gridbag);
    setBorder(BorderFactory.createTitledBorder(strTitle));

    cbSize = new JComboBox();
    cbSource = new JComboBox();

    c.fill = GridBagConstraints.BOTH;
    c.insets = compInsets;
    c.weighty = 1.0;

    c.weightx = 0.0;
    lblSize = new JLabel(getMsg("label.size"), JLabel.TRAILING);
    lblSize.setDisplayedMnemonic(getMnemonic("label.size"));
    lblSize.setLabelFor(cbSize);
    addToGB(lblSize, this, gridbag, c);
    c.weightx = 1.0;
    c.gridwidth = GridBagConstraints.REMAINDER;
    addToGB(cbSize, this, gridbag, c);

    c.weightx = 0.0;
    c.gridwidth = 1;
    lblSource = new JLabel(getMsg("label.source"), JLabel.TRAILING);
    lblSource.setDisplayedMnemonic(getMnemonic("label.source"));
    lblSource.setLabelFor(cbSource);
    addToGB(lblSource, this, gridbag, c);
    c.gridwidth = GridBagConstraints.REMAINDER;
    addToGB(cbSource, this, gridbag, c);
}
 
源代码14 项目: openjdk-jdk8u-backup   文件: ServiceDialog.java
public AppearancePanel() {
    super();

    GridBagLayout gridbag = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();

    setLayout(gridbag);

    c.fill = GridBagConstraints.BOTH;
    c.insets = panelInsets;
    c.weightx = 1.0;
    c.weighty = 1.0;

    c.gridwidth = GridBagConstraints.RELATIVE;
    pnlChromaticity = new ChromaticityPanel();
    addToGB(pnlChromaticity, this, gridbag, c);

    c.gridwidth = GridBagConstraints.REMAINDER;
    pnlQuality = new QualityPanel();
    addToGB(pnlQuality, this, gridbag, c);

    c.gridwidth = 1;
    pnlSides = new SidesPanel();
    addToGB(pnlSides, this, gridbag, c);

    c.gridwidth = GridBagConstraints.REMAINDER;
    pnlJobAttributes = new JobAttributesPanel();
    addToGB(pnlJobAttributes, this, gridbag, c);

}
 
源代码15 项目: TencentKona-8   文件: ServiceDialog.java
public CopiesPanel() {
    super();

    GridBagLayout gridbag = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();

    setLayout(gridbag);
    setBorder(BorderFactory.createTitledBorder(strTitle));

    c.fill = GridBagConstraints.HORIZONTAL;
    c.insets = compInsets;

    lblCopies = new JLabel(getMsg("label.numcopies"), JLabel.TRAILING);
    lblCopies.setDisplayedMnemonic(getMnemonic("label.numcopies"));
    lblCopies.getAccessibleContext().setAccessibleName(
                                     getMsg("label.numcopies"));
    addToGB(lblCopies, this, gridbag, c);

    snModel = new SpinnerNumberModel(1, 1, 999, 1);
    spinCopies = new JSpinner(snModel);
    lblCopies.setLabelFor(spinCopies);
    // REMIND
    ((JSpinner.NumberEditor)spinCopies.getEditor()).getTextField().setColumns(3);
    spinCopies.addChangeListener(this);
    c.gridwidth = GridBagConstraints.REMAINDER;
    addToGB(spinCopies, this, gridbag, c);

    cbCollate = createCheckBox("checkbox.collate", this);
    cbCollate.setEnabled(false);
    addToGB(cbCollate, this, gridbag, c);
}
 
源代码16 项目: OpenDA   文件: Query.java
/** Add a label and a widget to the panel.
 *  @param name The name of the entry.
 *  @param label The label.
 *  @param widget The interactive entry to the right of the label.
 *  @param entry The object that contains user data.
 */
protected void _addPair(
    String name,
    JLabel label,
    Component widget,
    Object entry) {
    // Surely there is a better layout manager in swing...
    // Note that Box and BoxLayout do not work because they do not
    // support gridded layout.
    _constraints.gridwidth = 1;
    _constraints.insets = _leftPadding;
    _grid.setConstraints(label, _constraints);
    _entryPanel.add(label);

    _constraints.insets = _noPadding;
    if (_columns > 1 && ((_entries.size() + 1) % _columns != 0)) {
        _constraints.gridwidth = 1;
    } else {
        _constraints.gridwidth = GridBagConstraints.REMAINDER;
    }
    _grid.setConstraints(widget, _constraints);
    _entryPanel.add(widget);

    _entries.put(name, entry);
    _labels.put(name, label);
    _previous.put(name, getStringValue(name));

    Dimension preferredSize = _entryPanel.getPreferredSize();
    // Add some slop to the width to take in to account
    // the width of the vertical scrollbar.
    preferredSize.width += 25;

    // Applets seem to need this, see CT/SigmaDelta
    _widgetsHeight += widget.getPreferredSize().height;
    preferredSize.height = _widgetsHeight;

    Toolkit tk = Toolkit.getDefaultToolkit();
    if (preferredSize.height > tk.getScreenSize().height) {
        // Fudge factor to keep this window smaller than the screen
        // height.  CGSUnitBase and the Code Generator are good tests.
        preferredSize.height = (int) (tk.getScreenSize().height * 0.75);
        _entryScrollPane.setPreferredSize(preferredSize);
    }

    _entryScrollPane.setPreferredSize(preferredSize);
    // Call revalidate for the scrollbar.
    _entryPanel.revalidate();
}
 
源代码17 项目: beautyeye   文件: TableDemo.java
protected JPanel createControlPanel() {
	JPanel controlPanel = new JPanel();
	GridBagLayout gridbag = new GridBagLayout();
	GridBagConstraints c = new GridBagConstraints();
	controlPanel.setLayout(gridbag);

	c.gridx = 0;
	c.gridy = 1;
	c.gridheight = 1;
	c.insets = new Insets(20, 10, 0, 10);
	c.anchor = GridBagConstraints.SOUTHWEST;
	JLabel searchLabel = new JLabel(getString("TableDemo.searchLabel",
			"Search Titles and Recipients"));
	controlPanel.add(searchLabel, c);

	c.gridx = 0;
	c.gridy = 2;
	c.weightx = 1.0;
	c.insets.top = 0;
	c.insets.bottom = 12;
	c.anchor = GridBagConstraints.SOUTHWEST;
	// c.fill = GridBagConstraints.HORIZONTAL;
	filterField = new JTextField(24);
	filterField.getDocument().addDocumentListener(
			new SearchFilterListener());
	controlPanel.add(filterField, c);

	c.gridx = 1;
	c.gridy = 2;
	c.gridwidth = GridBagConstraints.REMAINDER;
	// c.insets.right = 24;
	// c.insets.left = 12;
	c.weightx = 0.0;
	c.anchor = GridBagConstraints.EAST;
	c.fill = GridBagConstraints.NONE;
	winnersCheckbox = new JCheckBox(getString("TableDemo.winnersLabel",
			"Show Only Winners"));
	winnersCheckbox.addChangeListener(new ShowWinnersListener());
	controlPanel.add(winnersCheckbox, c);

	return controlPanel;
}
 
源代码18 项目: jdk8u-jdk   文件: ServiceDialog.java
public JobAttributesPanel() {
    super();

    GridBagLayout gridbag = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();

    setLayout(gridbag);
    setBorder(BorderFactory.createTitledBorder(strTitle));

    c.fill = GridBagConstraints.NONE;
    c.insets = compInsets;
    c.weighty = 1.0;

    cbJobSheets = createCheckBox("checkbox.jobsheets", this);
    c.anchor = GridBagConstraints.LINE_START;
    addToGB(cbJobSheets, this, gridbag, c);

    JPanel pnlTop = new JPanel();
    lblPriority = new JLabel(getMsg("label.priority"), JLabel.TRAILING);
    lblPriority.setDisplayedMnemonic(getMnemonic("label.priority"));

    pnlTop.add(lblPriority);
    snModel = new SpinnerNumberModel(1, 1, 100, 1);
    spinPriority = new JSpinner(snModel);
    lblPriority.setLabelFor(spinPriority);
    // REMIND
    ((JSpinner.NumberEditor)spinPriority.getEditor()).getTextField().setColumns(3);
    spinPriority.addChangeListener(this);
    pnlTop.add(spinPriority);
    c.anchor = GridBagConstraints.LINE_END;
    c.gridwidth = GridBagConstraints.REMAINDER;
    pnlTop.getAccessibleContext().setAccessibleName(
                               getMsg("label.priority"));
    addToGB(pnlTop, this, gridbag, c);

    c.fill = GridBagConstraints.HORIZONTAL;
    c.anchor = GridBagConstraints.CENTER;
    c.weightx = 0.0;
    c.gridwidth = 1;
    char jmnemonic = getMnemonic("label.jobname");
    lblJobName = new JLabel(getMsg("label.jobname"), JLabel.TRAILING);
    lblJobName.setDisplayedMnemonic(jmnemonic);
    addToGB(lblJobName, this, gridbag, c);
    c.weightx = 1.0;
    c.gridwidth = GridBagConstraints.REMAINDER;
    tfJobName = new JTextField();
    lblJobName.setLabelFor(tfJobName);
    tfJobName.addFocusListener(this);
    tfJobName.setFocusAccelerator(jmnemonic);
    tfJobName.getAccessibleContext().setAccessibleName(
                                     getMsg("label.jobname"));
    addToGB(tfJobName, this, gridbag, c);

    c.weightx = 0.0;
    c.gridwidth = 1;
    char umnemonic = getMnemonic("label.username");
    lblUserName = new JLabel(getMsg("label.username"), JLabel.TRAILING);
    lblUserName.setDisplayedMnemonic(umnemonic);
    addToGB(lblUserName, this, gridbag, c);
    c.gridwidth = GridBagConstraints.REMAINDER;
    tfUserName = new JTextField();
    lblUserName.setLabelFor(tfUserName);
    tfUserName.addFocusListener(this);
    tfUserName.setFocusAccelerator(umnemonic);
    tfUserName.getAccessibleContext().setAccessibleName(
                                     getMsg("label.username"));
    addToGB(tfUserName, this, gridbag, c);
}
 
源代码19 项目: pentaho-reporting   文件: BasicStrokeEditor.java
/**
 *
 */
private void initGUI() {
  this.setLayout( new GridBagLayout() );
  final GridBagConstraints constraints = new GridBagConstraints();

  // Add the width label
  constraints.gridx = 0;
  constraints.gridy = 0;
  constraints.anchor = GridBagConstraints.EAST;
  this.add( new JLabel( "Width:" ), constraints );

  // Add the spinner with its model
  constraints.gridx = 1;
  constraints.gridy = 0;
  constraints.anchor = GridBagConstraints.WEST;
  final JTextField strokeWidthField = new JTextField();
  strokeWidthField.getDocument().addDocumentListener( new WidthUpdateHandler( strokeWidthField ) );
  strokeWidthField.setText( String.valueOf( width ) );
  strokeWidthField.setColumns( 6 );
  this.add( strokeWidthField, constraints );

  // Add the dash Label
  constraints.gridx = 0;
  constraints.gridy = 1;
  constraints.anchor = GridBagConstraints.CENTER;
  this.add( new JLabel( "Dashes:" ), constraints );

  // Add the dash comboBox
  constraints.gridx = 1;
  constraints.gridy = 1;

  final JComboBox dashComboBox =
      new JComboBox( new Object[] { BorderStyle.SOLID, BorderStyle.DASHED, BorderStyle.DOTTED,
        BorderStyle.DOT_DASH, BorderStyle.DOT_DOT_DASH } );
  dashComboBox.setRenderer( new BorderStyleRenderer() );
  dashComboBox.setSelectedItem( borderStyle );
  dashComboBox.addActionListener( new DashSelectionHandler( dashComboBox ) );
  this.add( dashComboBox, constraints );

  // Add the sample box
  constraints.gridx = 0;
  constraints.gridy = 2;
  constraints.gridwidth = GridBagConstraints.REMAINDER;
  constraints.fill = GridBagConstraints.HORIZONTAL;

  this.add( samplePanel, constraints );
}
 
源代码20 项目: megamek   文件: UnitDisplay.java
public UnitDisplay(@Nullable ClientGUI clientgui,
        @Nullable MegaMekController controller) {
    super(new GridBagLayout());
    this.clientgui = clientgui;

    tabStrip = new MechPanelTabStrip(this);

    displayP = new JPanel(new CardLayout());
    mPan = new MovementPanel();
    displayP.add("movement", mPan); //$NON-NLS-1$
    pPan = new PilotPanel(this);
    displayP.add("pilot", pPan); //$NON-NLS-1$
    aPan = new ArmorPanel(clientgui != null ? clientgui.getClient().getGame() : null, this);
    displayP.add("armor", aPan); //$NON-NLS-1$
    wPan = new WeaponPanel(this);
    displayP.add("weapons", wPan); //$NON-NLS-1$
    sPan = new SystemPanel(this);
    displayP.add("systems", sPan); //$NON-NLS-1$
    ePan = new ExtraPanel(this);
    displayP.add("extras", ePan); //$NON-NLS-1$

    // layout main panel
    GridBagConstraints c = new GridBagConstraints();
    c.fill = GridBagConstraints.BOTH;
    c.insets = new Insets(4, 1, 0, 1);

    c.weightx = 1.0;
    c.weighty = 0.0;

    c.gridwidth = GridBagConstraints.REMAINDER;
    addBag(tabStrip, c);
    c.insets = new Insets(0, 1, 1, 1);
    c.weighty = 1.0;
    addBag(displayP, c);

    ((CardLayout) displayP.getLayout()).show(displayP, "movement"); //$NON-NLS-1$
    
    if (controller != null) {
        registerKeyboardCommands(this, controller);
    }
}