SlideShare a Scribd company logo
FORMULARIO EN JAVA
package formulario1
import java.awt.Color;
import java.awt.Container;
import java.awt.Desktop;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;
public class Formulario1 extends JFrame implements ActionListener{
Container bl;
FlowLayout wr;
JPanel P1,P2,P3,P4,a,b,c,P5,P6,P7,P8,P9;
JButton bt1,bt2;
public Formulario1 (String Formulario16)
{
setSize(new Dimension(500,600));
bl = getContentPane();
wr = new FlowLayout(FlowLayout.CENTER);
bl.setLayout(wr);
setLayout(new FlowLayout(FlowLayout.LEFT, 10, 10));
this.getContentPane().setBackground (Color.pink);
//BOTONES
bt1=new JButton("INGRESAR");
bt2=new JButton("CONTACTENOS");
bt1.addActionListener(this);
bt2.addActionListener(this);
//Titulos
a = new JPanel(wr);
JLabel lba = new JLabel("INFORMACION DEL EMPLEADO");
lba.setForeground(Color.black);
lba.setFont(new Font("comic sans", Font.BOLD, 32));
a.setBackground(Color.pink);
a.add(lba);
c = new JPanel(wr);
JLabel lbc = new JLabel("Datos laborales");
lbc.setForeground(Color.black);
lbc.setFont(new Font("Comic sans", Font.BOLD, 30));
c.setBackground(Color.pink);
c.add(lbc);
b = new JPanel(wr);
JLabel lbb = new JLabel("Datos personales");
lbb.setForeground(Color.black);
lbb.setFont(new Font("comic sans", Font.BOLD, 28));
b.setBackground(Color.pink);
b.add(lbb);
//Creacion de paneles
P1 = new JPanel(wr);
P1.setBackground(Color.CYAN);
JLabel lb1 = new JLabel("¿CARGO?");
lb1.setForeground(Color.BLACK);
JTextField tx1 = new JTextField("",18);
tx1.setForeground(Color.BLACK);
P1.add(lb1);
P1.add(tx1);
P2 = new JPanel(wr);
P2.setBackground(Color.CYAN);
JLabel lb2 = new JLabel("SALARIO ASIGNADO");
lb2.setForeground(Color.BLACK);
JTextField tx2 = new JTextField("",16);
tx2.setForeground(Color.BLACK);
P2.add(lb2);
P2.add(tx2);
P4 = new JPanel(wr);
P4.setBackground(Color.CYAN);
JLabel lb4 = new JLabel("NOMBRE");
lb4.setForeground(Color.BLACK);
JTextField tx4 = new JTextField("",16);
tx4.setForeground(Color.BLACK);
P4.add(lb4);
P4.add(tx4);
P5 = new JPanel(wr);
P5.setBackground(Color.CYAN);
JLabel lb5 = new JLabel("APELLIDO");
lb5.setForeground(Color.BLACK);
JTextField tx5 = new JTextField("",16);
tx5.setForeground(Color.BLACK);
P5.add(lb5);
P5.add(tx5);
P6 = new JPanel(wr);
P6.setBackground(Color.CYAN);
JLabel lb6 = new JLabel("DOCUMENTO");
lb6.setForeground(Color.BLACK);
JTextField tx6 = new JTextField("",16);
tx6.setForeground(Color.BLACK);
P6.add(lb6);
P6.add(tx6);
P7 = new JPanel(wr);
P7.setBackground(Color.CYAN);
JLabel lb7 = new JLabel("TELEFONO");
lb7.setForeground(Color.BLACK);
JTextField tx7 = new JTextField("",16);
tx7.setForeground(Color.BLACK);
P7.add(lb7);
P7.add(tx7);
P8 = new JPanel(wr);
P8.setBackground(Color.CYAN);
JLabel lb8 = new JLabel("DIRECCION");
lb8.setForeground(Color.BLACK);
JTextField tx8 = new JTextField("",16);
tx8.setForeground(Color.BLACK);
P8.add(lb8);
P8.add(tx8);
P9= new JPanel(wr);
P9.setBackground(Color.CYAN);
JLabel lb9 = new JLabel("E-MAIL");
lb9.setForeground(Color.BLACK);
JTextField tx9 = new JTextField("",23);
tx9.setForeground(Color.BLACK);
P9.add(lb9);
P9.add(tx9);
//Botones
P3=new JPanel(wr);
P3.add(bt1);
P3.add(bt2);
//Paneles
JOptionPane.showMessageDialog(null,"registrarse");
bl.add (a);
bl.add(c);
bl.add(P1);
bl.add(P2);
bl.add(b);
bl.add(P4);
bl.add(P5);
bl.add(P6);
bl.add(P7);
bl.add(P8);
bl.add(P9);
bl.add(P3);
String texto =tx1.getText();
tx1.addActionListener(new Lector1());
tx2.addActionListener(new Lector2());
tx2.addActionListener(new Lector4());
tx2.addActionListener(new Lector5());
tx2.addActionListener(new Lector6());
tx2.addActionListener(new Lector7());
tx2.addActionListener(new Lector8());
tx2.addActionListener(new Lector9());
}
public static void main(String[] args) {
{
Formulario1 frame = new Formulario1(" Formulario1");
frame.setVisible(true);
}
}
@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==bt1){try{
Desktop.getDesktop().browse(new URI("www.facebook.com"));
}
catch (IOException ex) {
JOptionPane.showMessageDialog(null,"NO SE HA PODIDO INGR5ESAR");
} catch (URISyntaxException ex) {
Logger.getLogger(Formulario1.class.getName()).log(Level.SEVERE, null, ex);
}
}
if(e.getSource()==bt2){try{
Desktop.getDesktop().browse(new URI("www.google.com"));
}
catch (IOException ex) {
JOptionPane.showMessageDialog(null,"NO SE HA PODIDO INGR5ESAR");
} catch (URISyntaxException ex) {
Logger.getLogger(Formulario1.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
private static class Lector1 implements ActionListener {
public Lector1() {
}
@Override
public void actionPerformed(ActionEvent e) {
throw new UnsupportedOperationException("CARGO");
}
}
private static class Lector2 implements ActionListener {
public Lector2() {
}
@Override
public void actionPerformed(ActionEvent e) {
throw new UnsupportedOperationException("SALARIO ASIGNADO");
}
}
private static class Lector4 implements ActionListener {
public Lector4() {
}
@Override
public void actionPerformed(ActionEvent e) {
throw new UnsupportedOperationException("NOMBRE");
}
}
private static class Lector5 implements ActionListener {
public Lector5() {
}
@Override
public void actionPerformed(ActionEvent e) {
throw new UnsupportedOperationException("APELLIDO");
}
}
private static class Lector6 implements ActionListener {
public Lector6() {
}
@Override
public void actionPerformed(ActionEvent e) {
throw new UnsupportedOperationException("DOCUMENTO");
}
}
private static class Lector7 implements ActionListener {
public Lector7() {
}
@Override
public void actionPerformed(ActionEvent e) {
throw new UnsupportedOperationException("TELEFONO");
}
}
private static class Lector8 implements ActionListener {
public Lector8() {
}
@Override
public void actionPerformed(ActionEvent e) {
throw new UnsupportedOperationException("DIRECCION");
}
}
private static class Lector9 implements ActionListener {
public Lector9() {
}
@Override
public void actionPerformed(ActionEvent e) {
throw new UnsupportedOperationException("e-mail");
}
}
}
Formulario en java

More Related Content

What's hot

The Ring programming language version 1.7 book - Part 85 of 196
The Ring programming language version 1.7 book - Part 85 of 196The Ring programming language version 1.7 book - Part 85 of 196
The Ring programming language version 1.7 book - Part 85 of 196
Mahmoud Samir Fayed
 
Vaadin 7 Today and Tomorrow
Vaadin 7 Today and TomorrowVaadin 7 Today and Tomorrow
Vaadin 7 Today and Tomorrow
Joonas Lehtinen
 
The Ring programming language version 1.9 book - Part 40 of 210
The Ring programming language version 1.9 book - Part 40 of 210The Ring programming language version 1.9 book - Part 40 of 210
The Ring programming language version 1.9 book - Part 40 of 210
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.2 book - Part 25 of 181
The Ring programming language version 1.5.2 book - Part 25 of 181The Ring programming language version 1.5.2 book - Part 25 of 181
The Ring programming language version 1.5.2 book - Part 25 of 181
Mahmoud Samir Fayed
 
C#
C#C#
The Ring programming language version 1.5.2 book - Part 78 of 181
The Ring programming language version 1.5.2 book - Part 78 of 181The Ring programming language version 1.5.2 book - Part 78 of 181
The Ring programming language version 1.5.2 book - Part 78 of 181
Mahmoud Samir Fayed
 
Pattern printing programs
Pattern printing programsPattern printing programs
Pattern printing programs
Mukesh Tekwani
 
The Ring programming language version 1.2 book - Part 57 of 84
The Ring programming language version 1.2 book - Part 57 of 84The Ring programming language version 1.2 book - Part 57 of 84
The Ring programming language version 1.2 book - Part 57 of 84
Mahmoud Samir Fayed
 
C# labprograms
C# labprogramsC# labprograms
C# labprograms
Jafar Nesargi
 
Grammatical Optimization
Grammatical OptimizationGrammatical Optimization
Grammatical Optimization
adil raja
 
Python-GTK
Python-GTKPython-GTK
Python-GTK
Yuren Ju
 
Jdk 7 4-forkjoin
Jdk 7 4-forkjoinJdk 7 4-forkjoin
Jdk 7 4-forkjoin
knight1128
 
The Ring programming language version 1.5.2 book - Part 13 of 181
The Ring programming language version 1.5.2 book - Part 13 of 181The Ring programming language version 1.5.2 book - Part 13 of 181
The Ring programming language version 1.5.2 book - Part 13 of 181
Mahmoud Samir Fayed
 
Java Practical File Diploma
Java Practical File DiplomaJava Practical File Diploma
Java Practical File Diploma
mustkeem khan
 
The Ring programming language version 1.9 book - Part 94 of 210
The Ring programming language version 1.9 book - Part 94 of 210The Ring programming language version 1.9 book - Part 94 of 210
The Ring programming language version 1.9 book - Part 94 of 210
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 93 of 212
The Ring programming language version 1.10 book - Part 93 of 212The Ring programming language version 1.10 book - Part 93 of 212
The Ring programming language version 1.10 book - Part 93 of 212
Mahmoud Samir Fayed
 
DSU C&C++ Practical File Diploma
DSU C&C++ Practical File DiplomaDSU C&C++ Practical File Diploma
DSU C&C++ Practical File Diploma
mustkeem khan
 
The Ring programming language version 1.5.3 book - Part 87 of 184
The Ring programming language version 1.5.3 book - Part 87 of 184The Ring programming language version 1.5.3 book - Part 87 of 184
The Ring programming language version 1.5.3 book - Part 87 of 184
Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 84 of 189
The Ring programming language version 1.6 book - Part 84 of 189The Ring programming language version 1.6 book - Part 84 of 189
The Ring programming language version 1.6 book - Part 84 of 189
Mahmoud Samir Fayed
 
MFC Letter
MFC LetterMFC Letter

What's hot (20)

The Ring programming language version 1.7 book - Part 85 of 196
The Ring programming language version 1.7 book - Part 85 of 196The Ring programming language version 1.7 book - Part 85 of 196
The Ring programming language version 1.7 book - Part 85 of 196
 
Vaadin 7 Today and Tomorrow
Vaadin 7 Today and TomorrowVaadin 7 Today and Tomorrow
Vaadin 7 Today and Tomorrow
 
The Ring programming language version 1.9 book - Part 40 of 210
The Ring programming language version 1.9 book - Part 40 of 210The Ring programming language version 1.9 book - Part 40 of 210
The Ring programming language version 1.9 book - Part 40 of 210
 
The Ring programming language version 1.5.2 book - Part 25 of 181
The Ring programming language version 1.5.2 book - Part 25 of 181The Ring programming language version 1.5.2 book - Part 25 of 181
The Ring programming language version 1.5.2 book - Part 25 of 181
 
C#
C#C#
C#
 
The Ring programming language version 1.5.2 book - Part 78 of 181
The Ring programming language version 1.5.2 book - Part 78 of 181The Ring programming language version 1.5.2 book - Part 78 of 181
The Ring programming language version 1.5.2 book - Part 78 of 181
 
Pattern printing programs
Pattern printing programsPattern printing programs
Pattern printing programs
 
The Ring programming language version 1.2 book - Part 57 of 84
The Ring programming language version 1.2 book - Part 57 of 84The Ring programming language version 1.2 book - Part 57 of 84
The Ring programming language version 1.2 book - Part 57 of 84
 
C# labprograms
C# labprogramsC# labprograms
C# labprograms
 
Grammatical Optimization
Grammatical OptimizationGrammatical Optimization
Grammatical Optimization
 
Python-GTK
Python-GTKPython-GTK
Python-GTK
 
Jdk 7 4-forkjoin
Jdk 7 4-forkjoinJdk 7 4-forkjoin
Jdk 7 4-forkjoin
 
The Ring programming language version 1.5.2 book - Part 13 of 181
The Ring programming language version 1.5.2 book - Part 13 of 181The Ring programming language version 1.5.2 book - Part 13 of 181
The Ring programming language version 1.5.2 book - Part 13 of 181
 
Java Practical File Diploma
Java Practical File DiplomaJava Practical File Diploma
Java Practical File Diploma
 
The Ring programming language version 1.9 book - Part 94 of 210
The Ring programming language version 1.9 book - Part 94 of 210The Ring programming language version 1.9 book - Part 94 of 210
The Ring programming language version 1.9 book - Part 94 of 210
 
The Ring programming language version 1.10 book - Part 93 of 212
The Ring programming language version 1.10 book - Part 93 of 212The Ring programming language version 1.10 book - Part 93 of 212
The Ring programming language version 1.10 book - Part 93 of 212
 
DSU C&C++ Practical File Diploma
DSU C&C++ Practical File DiplomaDSU C&C++ Practical File Diploma
DSU C&C++ Practical File Diploma
 
The Ring programming language version 1.5.3 book - Part 87 of 184
The Ring programming language version 1.5.3 book - Part 87 of 184The Ring programming language version 1.5.3 book - Part 87 of 184
The Ring programming language version 1.5.3 book - Part 87 of 184
 
The Ring programming language version 1.6 book - Part 84 of 189
The Ring programming language version 1.6 book - Part 84 of 189The Ring programming language version 1.6 book - Part 84 of 189
The Ring programming language version 1.6 book - Part 84 of 189
 
MFC Letter
MFC LetterMFC Letter
MFC Letter
 

Viewers also liked

55701054 guia-java-en-espanol
55701054 guia-java-en-espanol55701054 guia-java-en-espanol
55701054 guia-java-en-espanol
George Mony
 
Proyecto sencillo con gui
Proyecto sencillo con guiProyecto sencillo con gui
Proyecto sencillo con gui
jbersosa
 
2da clase moviles_jme_alert_form_text_field_so_uch
2da clase moviles_jme_alert_form_text_field_so_uch2da clase moviles_jme_alert_form_text_field_so_uch
2da clase moviles_jme_alert_form_text_field_so_uch
epalomino2012
 
Concepto de layout
Concepto de layoutConcepto de layout
Concepto de layout
jbersosa
 
Evaluacion
EvaluacionEvaluacion
Evaluacion
jbersosa
 
Programacion en JAVA 2
Programacion en JAVA 2Programacion en JAVA 2
Programacion en JAVA 2
Jhomara Luzuriaga
 
фармакология
фармакологияфармакология
фармакологияNickEliot
 
Swing (1)
Swing (1)Swing (1)
Swing (1)
jbersosa
 
Ejemplo radio
Ejemplo radioEjemplo radio
Ejemplo radio
lupe ga
 

Viewers also liked (9)

55701054 guia-java-en-espanol
55701054 guia-java-en-espanol55701054 guia-java-en-espanol
55701054 guia-java-en-espanol
 
Proyecto sencillo con gui
Proyecto sencillo con guiProyecto sencillo con gui
Proyecto sencillo con gui
 
2da clase moviles_jme_alert_form_text_field_so_uch
2da clase moviles_jme_alert_form_text_field_so_uch2da clase moviles_jme_alert_form_text_field_so_uch
2da clase moviles_jme_alert_form_text_field_so_uch
 
Concepto de layout
Concepto de layoutConcepto de layout
Concepto de layout
 
Evaluacion
EvaluacionEvaluacion
Evaluacion
 
Programacion en JAVA 2
Programacion en JAVA 2Programacion en JAVA 2
Programacion en JAVA 2
 
фармакология
фармакологияфармакология
фармакология
 
Swing (1)
Swing (1)Swing (1)
Swing (1)
 
Ejemplo radio
Ejemplo radioEjemplo radio
Ejemplo radio
 

Similar to Formulario en java

Nouveau document texte-_-_
Nouveau document texte-_-_Nouveau document texte-_-_
Nouveau document texte-_-_
Mohamed Mlika
 
AJP Practical Questions with Solution.docx
AJP Practical Questions with Solution.docxAJP Practical Questions with Solution.docx
AJP Practical Questions with Solution.docx
RenuDeshmukh5
 
Java Week6(B) Notepad
Java Week6(B)   NotepadJava Week6(B)   Notepad
Java Week6(B) Notepad
Chaitanya Rajkumar Limmala
 
1.program to use JTextFieldsource codeimport java.awt.;impor.pdf
1.program to use JTextFieldsource codeimport java.awt.;impor.pdf1.program to use JTextFieldsource codeimport java.awt.;impor.pdf
1.program to use JTextFieldsource codeimport java.awt.;impor.pdf
aparetail
 
Revision c odesagain
Revision c odesagainRevision c odesagain
Revision c odesagain
rex0721
 
T.Y.B.S.CS Advance Java Practicals Sem 5 Mumbai University
T.Y.B.S.CS Advance Java Practicals Sem 5 Mumbai UniversityT.Y.B.S.CS Advance Java Practicals Sem 5 Mumbai University
T.Y.B.S.CS Advance Java Practicals Sem 5 Mumbai University
Niraj Bharambe
 
Awt
AwtAwt
ANSimport java.awt.event.;import javax.swing.; import java..pdf
ANSimport java.awt.event.;import javax.swing.; import java..pdfANSimport java.awt.event.;import javax.swing.; import java..pdf
ANSimport java.awt.event.;import javax.swing.; import java..pdf
anupambedcovers
 
662305 11
662305 11662305 11
Proyecto Poogame Tic Tac Toe
Proyecto Poogame Tic Tac ToeProyecto Poogame Tic Tac Toe
Proyecto Poogame Tic Tac Toe
EPN
 
Java Week10 Notepad
Java Week10   NotepadJava Week10   Notepad
Java Week10 Notepad
Chaitanya Rajkumar Limmala
 
Chat application in java using swing and socket programming.
Chat application in java using swing and socket programming.Chat application in java using swing and socket programming.
Chat application in java using swing and socket programming.
Kuldeep Jain
 
culadora cientifica en java
culadora cientifica en javaculadora cientifica en java
culadora cientifica en java
Jorge Llocclla Rojas
 
import javaxswing import javaawtevent import javai.pdf
import javaxswing import javaawtevent import javai.pdfimport javaxswing import javaawtevent import javai.pdf
import javaxswing import javaawtevent import javai.pdf
ADITIEYEWEAR
 
Binary patching for fun and profit @ JUG.ru, 25.02.2012
Binary patching for fun and profit @ JUG.ru, 25.02.2012Binary patching for fun and profit @ JUG.ru, 25.02.2012
Binary patching for fun and profit @ JUG.ru, 25.02.2012
Anton Arhipov
 
Prog iv
Prog ivProg iv
Prog iv
jbersosa
 
Tugas Praktikum Java 2
Tugas Praktikum Java 2Tugas Praktikum Java 2
Tugas Praktikum Java 2
azmi007
 
54240326 (1)
54240326 (1)54240326 (1)
54240326 (1)
Vinayak Shedgeri
 
54240326 copy
54240326   copy54240326   copy
54240326 copy
Vinayak Shedgeri
 
3. Section 3 � Complete functionality on listing screen (1.5 marks.pdf
3. Section 3 � Complete functionality on listing screen (1.5 marks.pdf3. Section 3 � Complete functionality on listing screen (1.5 marks.pdf
3. Section 3 � Complete functionality on listing screen (1.5 marks.pdf
alliedscorporation
 

Similar to Formulario en java (20)

Nouveau document texte-_-_
Nouveau document texte-_-_Nouveau document texte-_-_
Nouveau document texte-_-_
 
AJP Practical Questions with Solution.docx
AJP Practical Questions with Solution.docxAJP Practical Questions with Solution.docx
AJP Practical Questions with Solution.docx
 
Java Week6(B) Notepad
Java Week6(B)   NotepadJava Week6(B)   Notepad
Java Week6(B) Notepad
 
1.program to use JTextFieldsource codeimport java.awt.;impor.pdf
1.program to use JTextFieldsource codeimport java.awt.;impor.pdf1.program to use JTextFieldsource codeimport java.awt.;impor.pdf
1.program to use JTextFieldsource codeimport java.awt.;impor.pdf
 
Revision c odesagain
Revision c odesagainRevision c odesagain
Revision c odesagain
 
T.Y.B.S.CS Advance Java Practicals Sem 5 Mumbai University
T.Y.B.S.CS Advance Java Practicals Sem 5 Mumbai UniversityT.Y.B.S.CS Advance Java Practicals Sem 5 Mumbai University
T.Y.B.S.CS Advance Java Practicals Sem 5 Mumbai University
 
Awt
AwtAwt
Awt
 
ANSimport java.awt.event.;import javax.swing.; import java..pdf
ANSimport java.awt.event.;import javax.swing.; import java..pdfANSimport java.awt.event.;import javax.swing.; import java..pdf
ANSimport java.awt.event.;import javax.swing.; import java..pdf
 
662305 11
662305 11662305 11
662305 11
 
Proyecto Poogame Tic Tac Toe
Proyecto Poogame Tic Tac ToeProyecto Poogame Tic Tac Toe
Proyecto Poogame Tic Tac Toe
 
Java Week10 Notepad
Java Week10   NotepadJava Week10   Notepad
Java Week10 Notepad
 
Chat application in java using swing and socket programming.
Chat application in java using swing and socket programming.Chat application in java using swing and socket programming.
Chat application in java using swing and socket programming.
 
culadora cientifica en java
culadora cientifica en javaculadora cientifica en java
culadora cientifica en java
 
import javaxswing import javaawtevent import javai.pdf
import javaxswing import javaawtevent import javai.pdfimport javaxswing import javaawtevent import javai.pdf
import javaxswing import javaawtevent import javai.pdf
 
Binary patching for fun and profit @ JUG.ru, 25.02.2012
Binary patching for fun and profit @ JUG.ru, 25.02.2012Binary patching for fun and profit @ JUG.ru, 25.02.2012
Binary patching for fun and profit @ JUG.ru, 25.02.2012
 
Prog iv
Prog ivProg iv
Prog iv
 
Tugas Praktikum Java 2
Tugas Praktikum Java 2Tugas Praktikum Java 2
Tugas Praktikum Java 2
 
54240326 (1)
54240326 (1)54240326 (1)
54240326 (1)
 
54240326 copy
54240326   copy54240326   copy
54240326 copy
 
3. Section 3 � Complete functionality on listing screen (1.5 marks.pdf
3. Section 3 � Complete functionality on listing screen (1.5 marks.pdf3. Section 3 � Complete functionality on listing screen (1.5 marks.pdf
3. Section 3 � Complete functionality on listing screen (1.5 marks.pdf
 

More from implantarb101

sistemas de informacion
sistemas de informacionsistemas de informacion
sistemas de informacion
implantarb101
 
Sistema informacion y modelo cliente servidor
Sistema informacion y modelo  cliente servidorSistema informacion y modelo  cliente servidor
Sistema informacion y modelo cliente servidor
implantarb101
 
Formulario6
Formulario6Formulario6
Formulario6
implantarb101
 
Formulario5
Formulario5Formulario5
Formulario5
implantarb101
 
Formulario4
Formulario4Formulario4
Formulario4
implantarb101
 
Formulario
FormularioFormulario
Formulario
implantarb101
 
Cuestionario
CuestionarioCuestionario
Cuestionario
implantarb101
 
Trabajo de sistemas de s c
Trabajo de sistemas de s cTrabajo de sistemas de s c
Trabajo de sistemas de s c
implantarb101
 
Cliente servidor
Cliente servidorCliente servidor
Cliente servidor
implantarb101
 
Sistemas de informacion
Sistemas de informacionSistemas de informacion
Sistemas de informacion
implantarb101
 

More from implantarb101 (10)

sistemas de informacion
sistemas de informacionsistemas de informacion
sistemas de informacion
 
Sistema informacion y modelo cliente servidor
Sistema informacion y modelo  cliente servidorSistema informacion y modelo  cliente servidor
Sistema informacion y modelo cliente servidor
 
Formulario6
Formulario6Formulario6
Formulario6
 
Formulario5
Formulario5Formulario5
Formulario5
 
Formulario4
Formulario4Formulario4
Formulario4
 
Formulario
FormularioFormulario
Formulario
 
Cuestionario
CuestionarioCuestionario
Cuestionario
 
Trabajo de sistemas de s c
Trabajo de sistemas de s cTrabajo de sistemas de s c
Trabajo de sistemas de s c
 
Cliente servidor
Cliente servidorCliente servidor
Cliente servidor
 
Sistemas de informacion
Sistemas de informacionSistemas de informacion
Sistemas de informacion
 

Recently uploaded

20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 

Recently uploaded (20)

20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 

Formulario en java

  • 1. FORMULARIO EN JAVA package formulario1 import java.awt.Color; import java.awt.Container; import java.awt.Desktop; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JTextField; public class Formulario1 extends JFrame implements ActionListener{ Container bl; FlowLayout wr;
  • 2. JPanel P1,P2,P3,P4,a,b,c,P5,P6,P7,P8,P9; JButton bt1,bt2; public Formulario1 (String Formulario16) { setSize(new Dimension(500,600)); bl = getContentPane(); wr = new FlowLayout(FlowLayout.CENTER); bl.setLayout(wr); setLayout(new FlowLayout(FlowLayout.LEFT, 10, 10)); this.getContentPane().setBackground (Color.pink); //BOTONES bt1=new JButton("INGRESAR"); bt2=new JButton("CONTACTENOS"); bt1.addActionListener(this); bt2.addActionListener(this);
  • 3. //Titulos a = new JPanel(wr); JLabel lba = new JLabel("INFORMACION DEL EMPLEADO"); lba.setForeground(Color.black); lba.setFont(new Font("comic sans", Font.BOLD, 32)); a.setBackground(Color.pink); a.add(lba); c = new JPanel(wr); JLabel lbc = new JLabel("Datos laborales"); lbc.setForeground(Color.black); lbc.setFont(new Font("Comic sans", Font.BOLD, 30)); c.setBackground(Color.pink); c.add(lbc); b = new JPanel(wr); JLabel lbb = new JLabel("Datos personales"); lbb.setForeground(Color.black); lbb.setFont(new Font("comic sans", Font.BOLD, 28)); b.setBackground(Color.pink); b.add(lbb); //Creacion de paneles
  • 4. P1 = new JPanel(wr); P1.setBackground(Color.CYAN); JLabel lb1 = new JLabel("¿CARGO?"); lb1.setForeground(Color.BLACK); JTextField tx1 = new JTextField("",18); tx1.setForeground(Color.BLACK); P1.add(lb1); P1.add(tx1); P2 = new JPanel(wr); P2.setBackground(Color.CYAN); JLabel lb2 = new JLabel("SALARIO ASIGNADO"); lb2.setForeground(Color.BLACK); JTextField tx2 = new JTextField("",16); tx2.setForeground(Color.BLACK); P2.add(lb2); P2.add(tx2); P4 = new JPanel(wr); P4.setBackground(Color.CYAN); JLabel lb4 = new JLabel("NOMBRE"); lb4.setForeground(Color.BLACK); JTextField tx4 = new JTextField("",16); tx4.setForeground(Color.BLACK); P4.add(lb4); P4.add(tx4);
  • 5. P5 = new JPanel(wr); P5.setBackground(Color.CYAN); JLabel lb5 = new JLabel("APELLIDO"); lb5.setForeground(Color.BLACK); JTextField tx5 = new JTextField("",16); tx5.setForeground(Color.BLACK); P5.add(lb5); P5.add(tx5); P6 = new JPanel(wr); P6.setBackground(Color.CYAN); JLabel lb6 = new JLabel("DOCUMENTO"); lb6.setForeground(Color.BLACK); JTextField tx6 = new JTextField("",16); tx6.setForeground(Color.BLACK); P6.add(lb6); P6.add(tx6); P7 = new JPanel(wr); P7.setBackground(Color.CYAN); JLabel lb7 = new JLabel("TELEFONO"); lb7.setForeground(Color.BLACK); JTextField tx7 = new JTextField("",16); tx7.setForeground(Color.BLACK); P7.add(lb7);
  • 6. P7.add(tx7); P8 = new JPanel(wr); P8.setBackground(Color.CYAN); JLabel lb8 = new JLabel("DIRECCION"); lb8.setForeground(Color.BLACK); JTextField tx8 = new JTextField("",16); tx8.setForeground(Color.BLACK); P8.add(lb8); P8.add(tx8); P9= new JPanel(wr); P9.setBackground(Color.CYAN); JLabel lb9 = new JLabel("E-MAIL"); lb9.setForeground(Color.BLACK); JTextField tx9 = new JTextField("",23); tx9.setForeground(Color.BLACK); P9.add(lb9); P9.add(tx9); //Botones P3=new JPanel(wr); P3.add(bt1); P3.add(bt2); //Paneles
  • 7. JOptionPane.showMessageDialog(null,"registrarse"); bl.add (a); bl.add(c); bl.add(P1); bl.add(P2); bl.add(b); bl.add(P4); bl.add(P5); bl.add(P6); bl.add(P7); bl.add(P8); bl.add(P9); bl.add(P3); String texto =tx1.getText(); tx1.addActionListener(new Lector1()); tx2.addActionListener(new Lector2()); tx2.addActionListener(new Lector4()); tx2.addActionListener(new Lector5()); tx2.addActionListener(new Lector6()); tx2.addActionListener(new Lector7()); tx2.addActionListener(new Lector8()); tx2.addActionListener(new Lector9()); }
  • 8. public static void main(String[] args) { { Formulario1 frame = new Formulario1(" Formulario1"); frame.setVisible(true); } } @Override public void actionPerformed(ActionEvent e) { if(e.getSource()==bt1){try{ Desktop.getDesktop().browse(new URI("www.facebook.com")); } catch (IOException ex) { JOptionPane.showMessageDialog(null,"NO SE HA PODIDO INGR5ESAR"); } catch (URISyntaxException ex) { Logger.getLogger(Formulario1.class.getName()).log(Level.SEVERE, null, ex); } } if(e.getSource()==bt2){try{ Desktop.getDesktop().browse(new URI("www.google.com")); } catch (IOException ex) {
  • 9. JOptionPane.showMessageDialog(null,"NO SE HA PODIDO INGR5ESAR"); } catch (URISyntaxException ex) { Logger.getLogger(Formulario1.class.getName()).log(Level.SEVERE, null, ex); } } } private static class Lector1 implements ActionListener { public Lector1() { } @Override public void actionPerformed(ActionEvent e) { throw new UnsupportedOperationException("CARGO"); } } private static class Lector2 implements ActionListener { public Lector2() { } @Override public void actionPerformed(ActionEvent e) {
  • 10. throw new UnsupportedOperationException("SALARIO ASIGNADO"); } } private static class Lector4 implements ActionListener { public Lector4() { } @Override public void actionPerformed(ActionEvent e) { throw new UnsupportedOperationException("NOMBRE"); } } private static class Lector5 implements ActionListener { public Lector5() { } @Override public void actionPerformed(ActionEvent e) { throw new UnsupportedOperationException("APELLIDO"); } } private static class Lector6 implements ActionListener {
  • 11. public Lector6() { } @Override public void actionPerformed(ActionEvent e) { throw new UnsupportedOperationException("DOCUMENTO"); } } private static class Lector7 implements ActionListener { public Lector7() { } @Override public void actionPerformed(ActionEvent e) { throw new UnsupportedOperationException("TELEFONO"); } } private static class Lector8 implements ActionListener { public Lector8() { } @Override public void actionPerformed(ActionEvent e) { throw new UnsupportedOperationException("DIRECCION");
  • 12. } } private static class Lector9 implements ActionListener { public Lector9() { } @Override public void actionPerformed(ActionEvent e) { throw new UnsupportedOperationException("e-mail"); } } }