AQUI POSTEO EL CODIGO DOND DEBERIA PONERSE LA IMAGEN
ESTO ES LO Q USO
Código:
HASTA ALLI TODO BIEN PERO DESPS NO ME FUNCIONA LA funcion setIcon y no se porque
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.ImageIcon;
//<applet width="800" height="800" code="AppletInterfaz7"></applet>
public class AppletInterfaz7 extends Applet implements ActionListener{
Button b1;
private ImageIcon icono;
public AppletInterfaz7() {
setLayout(new GridLayout(8, 64, 1, 1));
b1 = new Button("");
add(b1);
b1. addActionListener(this);
b1.setBackground(Color.white);
}
Código:
no me sale error pero no me carga nada porfavor ayuda solo me sale en el asistente algo asi public void actionPerformed(ActionEvent ae) {
if (ae.getSource() == b1) {
b1.setIcon(new ImageIcon("src/brook.gif"));
}
}
Código:
, lo necesito con el button no con el Jbutton para aclarar, ojala puedan ayudarme gracias de antemano cannot find symbol symbol: method setIcon(javax.swing.ImageIcon) location: class java.awt.Button -- (Alt-Enter shows hints)


