-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpro2.java
More file actions
49 lines (48 loc) · 1.18 KB
/
pro2.java
File metadata and controls
49 lines (48 loc) · 1.18 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
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class pro2 extends Frame implements ActionListener
{
Button a,b,d;
private JFrame f=new JFrame("Second homepage");
public pro2()
{
f.setSize(500,500);
f.setLayout(null);
f.setVisible(true);
a=new Button("Withdraw");
b=new Button("Balance Enquiry");
d=new Button("asd");
a.setBounds(100,100,80,40);
f.add(a);
b.setBounds(350,100,120,40);
f.add(b);
d.setBounds(170,190,80,40);
f.add(d);
a.addActionListener(this);
b.addActionListener(this);
d.addActionListener(this);
// f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public void actionPerformed(ActionEvent ae)
{
if(ae.getSource() == a)
{
//f.dispose();
new SecondFrame();
}
else
if(ae.getSource()==b)
{
new SecondFrame();
}
else
{
new tp2();
}
}
public static void main(String args[])
{
new pro2();
}
}