home *** CD-ROM | disk | FTP | other *** search
- package FontViewer.windows;
-
- import FontViewer.components.TextAreaFromFile;
- import java.awt.BorderLayout;
- import java.awt.Color;
- import java.awt.Dimension;
- import java.awt.GridLayout;
- import java.awt.Toolkit;
- import java.awt.event.WindowEvent;
- import java.util.ResourceBundle;
- import javax.swing.ImageIcon;
- import javax.swing.JLabel;
- import javax.swing.JPanel;
- import javax.swing.JTextArea;
- import javax.swing.JWindow;
- import javax.swing.border.LineBorder;
-
- public class Splash extends JWindow {
- private ImageIcon splashImage;
- private JLabel jLabel1;
- private JLabel jLabel2;
- private JPanel jPanel1;
- private JPanel jPanel2;
- private JTextArea jTextArea1;
-
- public Splash(String iconName) {
- ClassLoader cl = this.getClass().getClassLoader();
- this.splashImage = new ImageIcon(cl.getResource("FontViewer/resources/icons/" + iconName));
- this.initComponents();
- int w = 400;
- int h = 150;
- Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
- this.setBounds((screenSize.width - w) / 2, (screenSize.height - h) / 2, w, h);
- }
-
- private void initComponents() {
- this.jPanel2 = new JPanel();
- this.jPanel1 = new JPanel();
- this.jLabel1 = new JLabel();
- this.jLabel2 = new JLabel();
- this.jTextArea1 = new TextAreaFromFile("notice.txt");
- this.setBackground(Color.white);
- this.addWindowListener(new 1(this));
- this.jPanel2.setLayout(new GridLayout(1, 2, 0, 1));
- this.jPanel2.setBackground(new Color(102, 102, 102));
- this.jPanel2.setBorder(new LineBorder(new Color(102, 102, 102), 1, true));
- this.jPanel1.setLayout(new BorderLayout());
- this.jLabel1.setBackground(new Color(255, 255, 255));
- this.jLabel1.setHorizontalAlignment(0);
- this.jLabel1.setIcon(this.splashImage);
- this.jLabel1.setOpaque(true);
- this.jPanel1.add(this.jLabel1, "Center");
- this.jLabel2.setBackground(new Color(0, 0, 0));
- this.jLabel2.setForeground(new Color(255, 255, 255));
- this.jLabel2.setHorizontalAlignment(0);
- this.jLabel2.setText("Version " + ResourceBundle.getBundle("FontViewer.resources.Opcion").getString("version"));
- this.jLabel2.setOpaque(true);
- this.jPanel1.add(this.jLabel2, "South");
- this.jPanel2.add(this.jPanel1);
- this.jTextArea1.setBackground(new Color(204, 255, 204));
- this.jTextArea1.setForeground(new Color(102, 102, 102));
- this.jPanel2.add(this.jTextArea1);
- this.getContentPane().add(this.jPanel2, "Center");
- this.pack();
- }
-
- private void exitForm(WindowEvent evt) {
- System.exit(0);
- }
-
- // $FF: synthetic method
- static void access$000(Splash x0, WindowEvent x1) {
- x0.exitForm(x1);
- }
- }
-