1   package wbKerho;
2   
3   import javax.swing.JPanel;
4   import javax.swing.JLabel;
5   import java.awt.BorderLayout;
6   import javax.swing.SwingConstants;
7   import java.awt.Color;
8   
9   
10  /**
11   * Paneeli jossa on ohjelman tiedot
12   * @author vesal
13   * @version 5.1.2011
14   */
15  public class TiedotPanel extends JPanel {
16  
17      private static final long serialVersionUID = 1L;
18  
19      private static final String VERSIO = "2.1";
20  
21      private static final String teksti = 
22          "<html>\n"+
23          "<h1>J\u00C4SENREKISTERI</h1>\n"+
24          "<p></p>\n"+
25          "<p style=\"font-size:1.1em; text-align:center\">Versio "+VERSIO+"</p>\n"+
26          "<p></p>\n"+
27          "<p style=\"font-size:1.3em; text-align:center\"><i>Vesa Lappalainen</i></p>\n"+
28          "</html>\n";
29  
30      /**
31       * Create the panel.
32       */
33      public TiedotPanel() {
34          setLayout(new BorderLayout(0, 0));
35  
36          JLabel labelTiedot = new JLabel(teksti);
37          labelTiedot.setOpaque(true);
38          labelTiedot.setBackground(new Color(255, 255, 153));
39          labelTiedot.setHorizontalAlignment(SwingConstants.CENTER);
40          add(labelTiedot);
41  
42      }
43  
44  }
45