-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCall.java
More file actions
34 lines (29 loc) · 744 Bytes
/
Copy pathCall.java
File metadata and controls
34 lines (29 loc) · 744 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
package Swing;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class Call {
public static void main(String[] args) {
new Ad();
}
}
class Ad extends JFrame{
JButton b;
public Ad(){
setLayout(new FlowLayout());
setTitle("Call");
setVisible(true);
setSize(400,400);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
b=new JButton("Call");
add(b);
b.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent e) {
new Add();
dispose();
}
});
}
}