4 * Created on 08 November 2001, 18:23
10 package org.tjworld.vista.cid;
12 import java.awt.Dimension;
13 import java.awt.Point;
14 import java.awt.Color;
15 import java.awt.Toolkit;
16 import javax.swing.UIManager;
21 public class splash extends javax.swing.JFrame {
22 /** Locale-specific data container */
23 private java.util.ResourceBundle cIDresources;
29 /** Creates new form splash */
30 public splash(javax.swing.JFrame owner, java.util.ResourceBundle res) {
31 if(UIManager.getLookAndFeel().getSupportsWindowDecorations())
34 cIDresources = java.util.ResourceBundle.getBundle("org.tjworld.vista.cid.CIDresources", java.util.Locale.getDefault());
39 Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
40 Dimension childSize = getSize();
41 setLocation(new Point(screenSize.width/2 - childSize.width/2, screenSize.height/2 - childSize.height/2));
42 getContentPane().setBackground(Color.white);
45 /** This method is called from within the constructor to
46 * initialize the form.
47 * WARNING: Do NOT modify this code. The content of this method is
48 * always regenerated by the Form Editor.
50 private void initComponents() {//GEN-BEGIN:initComponents
51 message = new javax.swing.JLabel();
52 progress = new javax.swing.JProgressBar();
54 setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
55 setTitle("VisTA.CID");
56 setBackground(java.awt.Color.white);
59 addWindowListener(new java.awt.event.WindowAdapter() {
60 public void windowClosing(java.awt.event.WindowEvent evt) {
65 message.setForeground(java.awt.Color.red);
66 message.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/tjworld/vista/cid/media/vistaAnimation.gif")));
67 message.setText(cIDresources.getString("tLoading"));
68 getContentPane().add(message, java.awt.BorderLayout.CENTER);
70 progress.setBorderPainted(false);
71 progress.setIndeterminate(true);
72 progress.setOpaque(false);
73 getContentPane().add(progress, java.awt.BorderLayout.SOUTH);
76 }//GEN-END:initComponents
78 /** Exit the Application */
79 private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm
81 }//GEN-LAST:event_exitForm
84 * @param args the command line arguments
86 public static void main(String args[]) {
90 // Variables declaration - do not modify//GEN-BEGIN:variables
91 private javax.swing.JLabel message;
92 private javax.swing.JProgressBar progress;
93 // End of variables declaration//GEN-END:variables