My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
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
package com.lineadecodigo.java.swing;

/**
* @file FormularioBasicoSwing.java
* @version 1.0
* @author Linea de Codigo (http://lineadecodigo.com)
* @date 3-junio-2010
* @url http://lineadecodigo.com/java/formulario-basico-con-java-swing/
* @description Crea un formilario básico (etiqueta, campo de texto y botón con Java Swing.
*/

import java.awt.FlowLayout;
import javax.swing.*;

public class FormularioBasicoSwing extends JFrame {

private static final long serialVersionUID = 1L;

public FormularioBasicoSwing() {
super("Formulario Básico");

getContentPane().setLayout(new FlowLayout());

JLabel label = new JLabel("Introduce tu nombre:");
JTextField textfield = new JTextField("nombre",20);
JButton boton = new JButton("Enviar");
getContentPane().add(label);
getContentPane().add(textfield);
getContentPane().add(boton);

setSize(400,300);
setVisible(true);
}

public static void main(String argv[]) {
new FormularioBasicoSwing();
}

}

Change log

r253 by vcuervo on Jun 3, 2010   Diff
Cambio de literales
Go to: 
Project members, sign in to write a code review

Older revisions

r252 by vcuervo on Jun 3, 2010   Diff
Formulario básico con Java Swing
All revisions of this file

File info

Size: 1037 bytes, 39 lines
Powered by Google Project Hosting