-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathq13.java
More file actions
41 lines (40 loc) · 794 Bytes
/
Copy pathq13.java
File metadata and controls
41 lines (40 loc) · 794 Bytes
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
import java.awt.*;
import java.util.*;
import java.io.*;
import javax.swing.*;
import java.awt.event.*;
class A
{
A()
{
JFrame f=new JFrame("PhoneBook");
JButton b1=new JButton("Add contact");
b1.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
B z=new B();
}
});
JButton b2=new JButton("Search contact");
b2.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
C c=new C();
}
});
b1.setFont(new Font("serif",Font.BOLD,30));
b2.setFont(new Font("serif",Font.BOLD,30));
f.add(b1);
f.add(b2);
f.setDefaultCloseOperation(f.EXIT_ON_CLOSE);
f.setSize(400,200);
f.setVisible(true);
f.setLayout(new FlowLayout(FlowLayout.CENTER));
}
public static void main(String ar[])
{
A a=new A();
}
}