-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPNR_Status.java
More file actions
125 lines (105 loc) · 2.54 KB
/
PNR_Status.java
File metadata and controls
125 lines (105 loc) · 2.54 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
116
117
118
119
120
121
122
123
124
125
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class PNR_Status extends JFrame implements ActionListener
{
JTextField t1,t2;
JLabel l1,l2,l3;
JButton b1,b2,b3,b4,b5;
int a,b,c,d;
public PNR_Status()
{
setTitle(" PNR_Status ");
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLayout(new BorderLayout());
JLabel background =new JLabel(new ImageIcon("14.jpg"));
JLabel bb =new JLabel(new ImageIcon("1.jpg"));
//ImageIcon bb=new ImageIcon("clouds.jpg");
b1=new JButton("Login");
b2=new JButton("Forget password");
b3=new JButton("Creat account");
b4=new JButton("Help");
b5=new JButton("Exit");
t1=new JTextField(20);
t2=new JTextField(20);
l1=new JLabel("Login");
l2=new JLabel("User Name:");
l3=new JLabel("Psassword:");
//setBackground(bb);
add(background);
background.add(l3);
background.add(l1);
background.add(t1);
background.add(l2);
background.add(t2);
background.add(b1);
background.add(b2);
background.add(b3);
background.add(b4);
background.add(b5);
b4.add(bb);
setSize(600,650);
b3.addActionListener(this);
b1.addActionListener(this);
b2.addActionListener(this);
t1.addActionListener(this);
t2.addActionListener(this);
b4.addActionListener(this);
b5.addActionListener(this);
l1.setBounds(250,10,100,40);
l2.setBounds(100,100,150,30);
t1.setBounds(250,100,200,30);
t2.setBounds(250,150,200,30);
l3.setBounds(100,150,150,30);
b1.setBounds(100,250,100,30);
b2.setBounds(250,250,200,30);
b3.setBounds(150,350,300,30);
b4.setBounds(10,500,300,300);
b5.setBounds(500,500,100,30);
Font f3=new Font("Arial",Font.BOLD,20);
l2.setFont(f3);
l3.setFont(f3);
Font f1=new Font("Arial",Font.ITALIC,30);
l1.setFont(f1);
Font f2=new Font("Arial",Font.BOLD,20);
t2.setFont(f2);
t1.setFont(f2);
}
public static void main (String arg[])
{
//PNR_Status f1 = new PNR_Status();
}
public void actionPerformed(ActionEvent ae)
{
String aa=t1.getText();
String bb=t2.getText();
if(ae.getSource()==b1)
{
d=a+b+c;
t2.setText(Integer.toString(d));
JOptionPane.showMessageDialog(null,"Data Saved sucessfully..");
}
if(ae.getSource()==b2)
{
//t1.requestFocus();
//setBackground(ImageIcon("clouds.jpg"));
}
if(ae.getSource()==b3)
{
//t1.requestFocus();
//setBackground(ImageIcon("clouds.jpg"));
}
if(ae.getSource()==b4)
{
//t1.requestFocus();
//setBackground(ImageIcon("clouds.jpg"));
}
if(ae.getSource()==b5)
{
//t1.requestFocus();
//setBackground(ImageIcon("clouds.jpg"));
}
repaint();
}
}