Skip to content

Commit 476820f

Browse files
committed
Codigo Fuente Tutorial 10 de Java
1 parent 274feee commit 476820f

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package com.applikdos;
2+
3+
import javax.swing.*;
4+
5+
public class FormularioSwing extends JFrame {
6+
JButton btnAceptar;
7+
JTextField caja1;
8+
JLabel etiqueta;
9+
10+
public FormularioSwing() {
11+
setVisible(true);
12+
setSize(550, 250);
13+
setLayout(null);
14+
15+
etiqueta = new JLabel();
16+
etiqueta.setText("Nombre");
17+
etiqueta.setBounds(100, 10, 100, 30);
18+
getContentPane().add(etiqueta);
19+
20+
caja1 = new JTextField();
21+
caja1.setBounds(200, 10, 150, 30);
22+
getContentPane().add(caja1);
23+
24+
btnAceptar = new JButton();
25+
btnAceptar.setText("Aceptar");
26+
btnAceptar.setBounds(220, 100, 100, 30);
27+
getContentPane().add(btnAceptar);
28+
29+
}
30+
31+
public static void main(String[] args) {
32+
new FormularioSwing();
33+
}
34+
}

0 commit comments

Comments
 (0)