Search in sources :

Example 1 with GridBoxLayout

use of pcgen.gui2.util.GridBoxLayout in project pcgen by PCGen.

the class MainAbout method buildAwardsPanel.

/**
	 * Construct the awards panel. This panel shows each award
	 * the pcgen project has been awarded
	 *
	 * @return The awards panel.
	 */
private JPanel buildAwardsPanel() {
    JScrollPane sp = new JScrollPane();
    JPanel panel = new JPanel();
    JPanel aPanel = new JPanel();
    aPanel.setLayout(new GridBoxLayout(2, 2));
    aPanel.setBackground(Color.WHITE);
    Icon goldIcon = Icons.createImageIcon("gold200x200-2005.gif");
    if (goldIcon != null) {
        JLabel e2005 = new JLabel(goldIcon);
        aPanel.add(e2005);
        JTextArea title = new JTextArea();
        title.setLineWrap(true);
        title.setWrapStyleWord(true);
        title.setEditable(false);
        title.setText(LanguageBundle.getString("in_abt_awards_2005_ennie"));
        aPanel.add(title);
    }
    Icon bronzeIcon = Icons.createImageIcon("bronze200x200-2003.gif");
    if (bronzeIcon != null) {
        JLabel e2003 = new JLabel(bronzeIcon);
        aPanel.add(e2003);
        JTextArea title = new JTextArea();
        title.setLineWrap(true);
        title.setWrapStyleWord(true);
        title.setEditable(false);
        title.setText(LanguageBundle.getString("in_abt_awards_2003_ennie"));
        aPanel.add(title);
    }
    sp.setViewportView(aPanel);
    panel.add(sp, BorderLayout.CENTER);
    return panel;
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) JTextArea(javax.swing.JTextArea) JLabel(javax.swing.JLabel) Icon(javax.swing.Icon) GridBoxLayout(pcgen.gui2.util.GridBoxLayout)

Aggregations

Icon (javax.swing.Icon)1 JLabel (javax.swing.JLabel)1 JPanel (javax.swing.JPanel)1 JScrollPane (javax.swing.JScrollPane)1 JTextArea (javax.swing.JTextArea)1 GridBoxLayout (pcgen.gui2.util.GridBoxLayout)1