-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFormulario04.java
More file actions
33 lines (27 loc) · 781 Bytes
/
Copy pathFormulario04.java
File metadata and controls
33 lines (27 loc) · 781 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
/**
*
* @author GUSTAVO DOMINGUEZ
*/
import javax.swing.*;
import java.awt.event.*;
public class Formulario04 extends JFrame implements ActionListener {
JButton boton1;
public Formulario04() {
setLayout(null);
boton1 = new JButton("Finalizar");
boton1.setBounds(300, 250, 100, 30);
add(boton1);
boton1.addActionListener(this);
}
public void actionPerformed(ActionEvent e) {
if (e.getSource() == boton1) {
System.exit(0);
}
}
public static void main(String[] ar) {
Formulario04 formulario1 = new Formulario04();
formulario1.setBounds(0, 0, 450, 350);
formulario1.setVisible(true);
formulario1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}