-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflashscreen.java
More file actions
115 lines (94 loc) · 4.75 KB
/
flashscreen.java
File metadata and controls
115 lines (94 loc) · 4.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
package institute;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Timer;
public class flashscreen extends javax.swing.JFrame {
Timer timer;
ActionListener action;
Login lg;
public flashscreen() {
initComponents();
setLocationRelativeTo(this);
jLabel1.setText(null);
act();
timer = new Timer(100,action);
timer.start();
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jProgressBar1 = new javax.swing.JProgressBar();
jLabel1 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jProgressBar1.setBackground(new java.awt.Color(0, 153, 0));
getContentPane().add(jProgressBar1, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 550, 860, -1));
jLabel1.setIcon(new javax.swing.ImageIcon("C:\\Users\\Yash\\Music\\All Documents\\project folder\\logo1.jpg")); // NOI18N
getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 70, 750, 160));
jLabel4.setFont(new java.awt.Font("Tahoma", 1, 28)); // NOI18N
jLabel4.setForeground(new java.awt.Color(255, 0, 0));
jLabel4.setText(" Available Courses");
getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(-100, 250, 920, 140));
jLabel5.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jLabel5.setText(" C,C++,Java,C#,PHP,HTML,Tally,MS-Office,etc....");
getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 360, 710, 90));
jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/institute/05.jpg"))); // NOI18N
getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 980, 580));
pack();
setLocationRelativeTo(null);
}// </editor-fold>//GEN-END:initComponents
public static void main(String args[]) {
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(flashscreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(flashscreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(flashscreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(flashscreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new flashscreen().setVisible(true);
}
});
}
private void act() {
action= new ActionListener() {
public void actionPerformed(ActionEvent e) {
jProgressBar1.setValue(jProgressBar1.getValue() +2);
jProgressBar1.setStringPainted(true);
if(jProgressBar1.getPercentComplete() == 1.00)
{
timer.stop();
lg = new Login();
lg.setVisible(true);
dispose();
}
}
};
this.dispose();
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JProgressBar jProgressBar1;
// End of variables declaration//GEN-END:variables
}