SlideShare una empresa de Scribd logo
1 de 3
importjavax.swing.JFrame;
importjavax.swing.JLabel;
publicclassFormularioextendsJFrame {
privateinta ;
privateJLabeletiqueta1; //Decalaraciondelobjeto
privateStringcadena;
public Formulario(){
//indicarqueloscontrolesque van dentrodelformulario o de
//laventanaseranubicadosconcoordendaadsabsolutas(x,y)
setLayout(null);
cadena="PROGRAMACION III";
//Instanciar
etiqueta1=newJLabel("FISEI");
//Ubicar el control dentrodellaaventana
etiqueta1.setBounds(10, 5, 200, 30);
//Agegaretiquetaalformulario
this.add(etiqueta1);
}
publicstaticvoidmain(String[] args) {
// instanciarunobjetotipoventana
Formulario v = newFormulario();
// Ubicarlaventanaen el escritorio
v.setBounds(0, 0, 500, 400);
//Poneruntitulo
v.setTitle("Tecero B Electrónica");
//No permitirquecambie el tamaño
v.setResizable(false);
//Obtener el valor delapropiedadTitle
Stringtitulo =v.getTitle();
//Establecer el textodelJlabel
v.etiqueta1.setText(v.cadena);
//Mostrarlaventana
v.setVisible(true);
}
}
packagefisei;
importjavax.swing.JButton;
importjavax.swing.JFrame;
importjavax.swing.JLabel;
publicclassVentanaextendsJFrame {
//Decalararunobjetoquerepresenteunboton
privateJButtonboton1;
privateJButtonboton2;
privateJButtonboton3;
privateJButtonboton4;
privateJLabeletiqueta1;
privateJLabeletiqueta2;
privateJLabeletiqueta3;
privateJLabeletiqueta4;
privateJLabeletiqueta5;
//Constructor
public Ventana(){
//Establecerlaubicaciondelascoordenadas
this.setLayout(null);
//InstanciarunobjetodetipoJButton y establecer el texto
boton1=newJButton("Salir");
//Ubicardentrodelformulario
boton1.setBounds(300,250,100,30);
//Añadir el boton
this.add(boton1);
boton2=newJButton("Jessy");
boton2.setBounds(300,20,100,30);
this.add(boton2);
boton3=newJButton("Dey");
boton3.setBounds(30,250,100,30);
this.add(boton3);
boton4=newJButton("Hola");
boton4.setBounds(30,20,100,30);
this.add(boton4);
etiqueta1= newJLabel("1");
etiqueta1.setBounds(350,220, 30, 30);
this.add(etiqueta1);
etiqueta2= newJLabel("2");
etiqueta2.setBounds(80,220, 30, 30);
this.add(etiqueta2);
etiqueta3= newJLabel("3");
etiqueta3.setBounds(80,50, 30, 30);
this.add(etiqueta3);
etiqueta4= newJLabel("4");
etiqueta4.setBounds(350,50, 30, 30);
this.add(etiqueta4);
etiqueta4= newJLabel("Deisy Jiménez y Jessica Vivanco");
etiqueta4.setBounds(125,150, 300, 30);
this.add(etiqueta4);
}
publicstaticvoidmain(String[] args) {
//Decalara e instanciar
Ventana v=new Ventana ();
//Ubicardentrodelescritorio
v.setBounds(0,0,450,350);
//Mostrar el formulario
v.setVisible(true);
}
}

Más contenido relacionado

La actualidad más candente

La actualidad más candente (17)

ESTRUCTURA DE JAVA
ESTRUCTURA DE JAVAESTRUCTURA DE JAVA
ESTRUCTURA DE JAVA
 
Líneas+de+código
Líneas+de+códigoLíneas+de+código
Líneas+de+código
 
Connection
ConnectionConnection
Connection
 
Disparadores Trigger En Sql Y My Sql
Disparadores Trigger En Sql Y My SqlDisparadores Trigger En Sql Y My Sql
Disparadores Trigger En Sql Y My Sql
 
Objetos de Esquema de Oracle Database Z052-09
Objetos de Esquema de Oracle Database Z052-09Objetos de Esquema de Oracle Database Z052-09
Objetos de Esquema de Oracle Database Z052-09
 
Triggers en BD mysql
Triggers en BD mysqlTriggers en BD mysql
Triggers en BD mysql
 
Trigger activadores
Trigger    activadoresTrigger    activadores
Trigger activadores
 
Fundamentos de SELECT SQL
Fundamentos de SELECT SQLFundamentos de SELECT SQL
Fundamentos de SELECT SQL
 
Curso SQL - Leccion 6
Curso SQL - Leccion 6Curso SQL - Leccion 6
Curso SQL - Leccion 6
 
Otros Objetos de Esquemas Z051 Cap 12
Otros Objetos de Esquemas Z051 Cap 12Otros Objetos de Esquemas Z051 Cap 12
Otros Objetos de Esquemas Z051 Cap 12
 
La funcion informatica
La funcion informaticaLa funcion informatica
La funcion informatica
 
Activadores
ActivadoresActivadores
Activadores
 
Plop
PlopPlop
Plop
 
Bison
BisonBison
Bison
 
Inserción de datos y selección de datos
Inserción de datos y selección de datosInserción de datos y selección de datos
Inserción de datos y selección de datos
 
GEOMETRIC COMPUTER PROGRAMA DE BD
GEOMETRIC COMPUTER PROGRAMA DE BDGEOMETRIC COMPUTER PROGRAMA DE BD
GEOMETRIC COMPUTER PROGRAMA DE BD
 
Utilizando DDL SQL oracle Z051 Cap 11
Utilizando DDL SQL oracle Z051 Cap 11Utilizando DDL SQL oracle Z051 Cap 11
Utilizando DDL SQL oracle Z051 Cap 11
 

Destacado

31130301 life-of-elijah-chapter-four
31130301 life-of-elijah-chapter-four31130301 life-of-elijah-chapter-four
31130301 life-of-elijah-chapter-fourGLENN PEASE
 
Measuring the informal economy: From employment in the informal sector to inf...
Measuring the informal economy: From employment in the informal sector to inf...Measuring the informal economy: From employment in the informal sector to inf...
Measuring the informal economy: From employment in the informal sector to inf...Dr Lendy Spires
 
Poetry self publish project
Poetry self publish projectPoetry self publish project
Poetry self publish projectkatherinean2015
 
Siam Marine Rehabilitation Foundation Report # 1/2014
Siam Marine Rehabilitation Foundation Report # 1/2014 Siam Marine Rehabilitation Foundation Report # 1/2014
Siam Marine Rehabilitation Foundation Report # 1/2014 Phaopipat Charoenpak
 
[Live coding] 4회 6 6 (camp-exam_font_test, weather)
[Live coding] 4회 6 6 (camp-exam_font_test, weather)[Live coding] 4회 6 6 (camp-exam_font_test, weather)
[Live coding] 4회 6 6 (camp-exam_font_test, weather)동욱 하
 
Question 3
Question 3Question 3
Question 3Tasha544
 
Resolucion 2346 de_2007
Resolucion 2346 de_2007Resolucion 2346 de_2007
Resolucion 2346 de_2007angela Estevan
 
CursNormas de etiqueta en internet (1)
CursNormas de etiqueta en internet (1)CursNormas de etiqueta en internet (1)
CursNormas de etiqueta en internet (1)Jenny Sánchez
 

Destacado (12)

Yourprezi
YourpreziYourprezi
Yourprezi
 
31130301 life-of-elijah-chapter-four
31130301 life-of-elijah-chapter-four31130301 life-of-elijah-chapter-four
31130301 life-of-elijah-chapter-four
 
Measuring the informal economy: From employment in the informal sector to inf...
Measuring the informal economy: From employment in the informal sector to inf...Measuring the informal economy: From employment in the informal sector to inf...
Measuring the informal economy: From employment in the informal sector to inf...
 
Poetry self publish project
Poetry self publish projectPoetry self publish project
Poetry self publish project
 
Siam Marine Rehabilitation Foundation Report # 1/2014
Siam Marine Rehabilitation Foundation Report # 1/2014 Siam Marine Rehabilitation Foundation Report # 1/2014
Siam Marine Rehabilitation Foundation Report # 1/2014
 
Trabajo
TrabajoTrabajo
Trabajo
 
[Live coding] 4회 6 6 (camp-exam_font_test, weather)
[Live coding] 4회 6 6 (camp-exam_font_test, weather)[Live coding] 4회 6 6 (camp-exam_font_test, weather)
[Live coding] 4회 6 6 (camp-exam_font_test, weather)
 
La Investigación.
La Investigación.La Investigación.
La Investigación.
 
Question 3
Question 3Question 3
Question 3
 
Diccionario de redes y telelcomunicaciones
Diccionario de redes y telelcomunicaciones Diccionario de redes y telelcomunicaciones
Diccionario de redes y telelcomunicaciones
 
Resolucion 2346 de_2007
Resolucion 2346 de_2007Resolucion 2346 de_2007
Resolucion 2346 de_2007
 
CursNormas de etiqueta en internet (1)
CursNormas de etiqueta en internet (1)CursNormas de etiqueta en internet (1)
CursNormas de etiqueta en internet (1)
 

Similar a Import javax

Similar a Import javax (20)

Guia5 java
Guia5 javaGuia5 java
Guia5 java
 
Taller interfaz 2
Taller interfaz 2Taller interfaz 2
Taller interfaz 2
 
Interfaces con Java
Interfaces con JavaInterfaces con Java
Interfaces con Java
 
Java
JavaJava
Java
 
Programa
ProgramaPrograma
Programa
 
Semana 5 Java Swing
Semana 5   Java SwingSemana 5   Java Swing
Semana 5 Java Swing
 
Java::Acceso a Bases de Datos
Java::Acceso a Bases de DatosJava::Acceso a Bases de Datos
Java::Acceso a Bases de Datos
 
Proyecto sencillo con gui
Proyecto sencillo con guiProyecto sencillo con gui
Proyecto sencillo con gui
 
Lab3-POO
Lab3-POOLab3-POO
Lab3-POO
 
Manuales seminario java-manualdejava-sem 3 - 4
Manuales seminario java-manualdejava-sem 3 - 4Manuales seminario java-manualdejava-sem 3 - 4
Manuales seminario java-manualdejava-sem 3 - 4
 
Swing
SwingSwing
Swing
 
AGENDA
AGENDAAGENDA
AGENDA
 
Guia4 java
Guia4 javaGuia4 java
Guia4 java
 
Java tema06a
Java tema06aJava tema06a
Java tema06a
 
Informe tecnico unidad 2
Informe tecnico unidad 2Informe tecnico unidad 2
Informe tecnico unidad 2
 
Informetecnicou2 topicos
Informetecnicou2 topicosInformetecnicou2 topicos
Informetecnicou2 topicos
 
9.herencia en java
9.herencia en java9.herencia en java
9.herencia en java
 
Ejemplo j internalframe_gine
Ejemplo j internalframe_gineEjemplo j internalframe_gine
Ejemplo j internalframe_gine
 
Clase 21 programacion ejb 3.0
Clase 21 programacion ejb 3.0Clase 21 programacion ejb 3.0
Clase 21 programacion ejb 3.0
 
Reporte de grafos con semagforos de 3,3,4 y 6 procesos
Reporte de grafos con semagforos de 3,3,4 y 6 procesosReporte de grafos con semagforos de 3,3,4 y 6 procesos
Reporte de grafos con semagforos de 3,3,4 y 6 procesos
 

Import javax