Hola gente, que tal, hacia mucho no andaba por aquí, me encuentro con un problema en java, al trabajar con multiples fuentes, el problema es que no me aparecen los JButton, si bien si me aparecen estos se ven pero sin rellenar, solo el contorno en gris, espero me puedan ayudar
Saludos!
import javax.swing.JPanel;
import javax.swing.JFrame;
import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.beans.PropertyChangeListener;
import javax.swing.Action;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
public class principal {
public static void main
(String[] args
) {
Marco ventana = new Marco();
}
}
{
public Marco()
{
Lamina panel = new Lamina();
this.add(panel);
this.setTitle("ventana");
this.setSize(500, 500);
this.setVisible(true);
this.
setDefaultCloseOperation(JFrame.
EXIT_ON_CLOSE); }
}
{
public Lamina()
{
AccionColor accionAmarillo
= new AccionColor
("Amarillo",
(new ImageIcon("src/amarillo.gif")),
Color.
YELLOW); AccionColor accionAzul
= new AccionColor
("Azul",
(new ImageIcon("src/azul.gif")),
Color.
BLUE); AccionColor accionRojo
= new AccionColor
("Rojo",
(new ImageIcon("src/rojo.gif")),
Color.
RED);
amarillo
= new JButton(accionAmarillo
);
this.add(amarillo);
this.add(rojo);
this.add(azul);
}
class AccionColor
implements Action {
{
this.
putValue(Action.
NAME, nombre
); this.
putValue(Action.
SMALL_ICON, icono
); this.putValue("color_de_fondo", c);
this.
putValue(Action.
SHORT_DESCRIPTION,
"poner fondo en " + nombre
); }
@Override
// TODO Auto-generated method stub
}
@Override
// TODO Auto-generated method stub
}
@Override
// TODO Auto-generated method stub
return null;
}
@Override
public boolean isEnabled() {
// TODO Auto-generated method stub
return false;
}
@Override
// TODO Auto-generated method stub
}
@Override
// TODO Auto-generated method stub
}
@Override
public void setEnabled(boolean arg0) {
// TODO Auto-generated method stub
}
}
}