no se ejecuta mi codigo porfa ayudenme
Publicado por enrique (1 intervención) el 19/08/2019 01:57:48
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
public class Bienvenida extends JFrame implements ActionListener{
private JTextField textofiel1;
private JLabel label1, label2, label3, label4;
private JButton boton1;
public Bienvenida(){
setLayout(null);
setTitle("Bienvenido");
getContentPane().setBackground(new Color(255,0,0));
setIconImage(new ImageIcon(getClass().getResource("images/icon.png")).getImage());
ImageIcon imagen = new ImageIcon("images/logo-coca.png");
label1 = new JLabel(imagen);
label1.setBounds(25,15,200,150);
add(label1);
label2 = new JLabel("Sistema de Control Vacacional");
label2.setBounds(35,135,300,30);
label2.setFont(new Font("Andale Mono", 3, 18));
label2.setForeground(new Color(255,255,255));
add(label2);
label3 = new JLabel("Ingrese su Nombre");
label3.setBounds(45,212,200,30);
label3.setFont(new Font("Andale Mono", 1, 12));
label3.setForeground(new Color(255,255,255));
add(label3);
label4 = new JLabel("©2017 The Coca-Cola Company");
label4.setBounds(85,375,300,30);
label4.setFont(new Font("Andale Mono", 1, 12));
label4.setForeground(new Color(255,255,255));
add(label4);
textofiel1 = new JTextField();
textofiel1.setBounds(45,240,255,25);
textofiel1.setBackground(new Color(224,224,224));
label4.setFont(new Font("Andale Mono", 1, 14));
label4.setForeground(new Color(255,0,0));
add(textofiel1);
boton1 = new JButton("Ingresar");
boton1.setBounds(125,280,100,30);
boton1.setBackground(new Color(255,255,255));
boton1.setFont(new Font("Andale Mono", 1, 14));
boton1.setForeground(new Color(255,0,0));
boton1.addActionListener(this);
add(boton1);
}
public void actionPerformed(ActionEvent e){
if(e.getSource() == boton1){
}
}
public static void main(String args[]){
Bienvenida ventana = new Bienvenida();
ventana.setBounds(0,0,350,450);
ventana.setVisible(true);
ventana.setResizable(false);
ventana.setLocationRelativeTo(null);
}
}
me sale Execpcion in thread "main" java.lang.nullpointerexeption
Valora esta pregunta


0