- import javax.swing.*;
- import java.awt.*;
- public class Ventana extends JFrame {
- ..public Ventana() {
- ....Container c = getContentPane();
- ....c.setLayout(new FlowLayout());
- ....this.setSize(250,150);
- ....this.setTitle("Titulo ventana");
- ....this.setDefaultCloseOperation(EXIT_ON_CLOSE);
- ....this.setVisible(true);
- ..}
- ..public static void main (String [] args) {
- ....Ventana v = new Ventana();
- ..}
- }
Resultado:
No hay comentarios:
Publicar un comentario