Java - abstract class

 
Vista:
sin imagen de perfil
Val: 27
Ha aumentado su posición en 37 puestos en Java (en relación al último mes)
Gráfica de Java

abstract class

Publicado por pepe (15 intervenciones) el 26/05/2021 19:06:27
Buenas , mi maestro no pudo resolverme pero me aparece este error( LaminaBotones is not abstract and does not override abstract method actionPerformed(ActionEvent) in ActionListener)
les dejo el codigo de mi clase no se porque :C pero al precionar un btoon me sale un buen de errores miren
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
package Vista_ADCS;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
/**
 *
 * @author aryda
 */
public class LaminaBotones extends JPanel implements ActionListener{
    private JButton b1;
    private JButton b2;
    private JButton b3;
    private JButton b4;
    /*private JTextField txtMensaje;
    private JLabel lblMensaje;*/
 
    public LaminaBotones()
    {
 
        b1 = new JButton("Mensaje");
        b2 = new JButton("IMC");
        b3 = new JButton("Conversor");
        b4 = new JButton("Salir");
        /*txtMensaje = new JTextField("");
        lblMensaje = new JLabel("MENSAJE");*/
        b1.setBounds(10, 20, 100, 50);
        add(b1);
        b2.setBounds(10, 100, 100, 50);
        add(b2);
        b3.setBounds(10, 180, 100, 50);
        add(b3);
        b4.setBounds(10, 260, 100, 50);
        add(b4);
        b1.addActionListener(this);
        b2.addActionListener(this);
        b3.addActionListener(this);
        b4.addActionListener(this);
       /* lblMensaje.setBounds(150, 150, 100, 30);
        add(lblMensaje);
        txtMensaje.setBounds(150, 180, 150, 30);
        add(txtMensaje);*/
        setVisible(true);
    }
    public void ActionPerformed(ActionEvent e)
    {
        if (e.getSource()== b1)
        {
            JOptionPane.showConfirmDialog(null, "Bienvenido al boton 1");
        }
        else if (e.getSource()== b2)
        {
            JOptionPane.showConfirmDialog(null, "Bienvenido al boton IMC");
            FrmIMC_ADCS F = new FrmIMC_ADCS();
        }
        else if (e.getSource()== b3)
        {
            JOptionPane.showConfirmDialog(null, "Bienvenido al boton Conversor");
        }
        else if (e.getSource()== b4)
        {
            JOptionPane.showConfirmDialog(null, "Salir");
            System.exit(0);
        }
    }
 
 
}
aiuda :C
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder