Saludos!
Código
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 { { Marco ventana = new Marco(); } } { public Marco() { Lamina panel = new Lamina(); this.add(panel); this.setTitle("ventana"); this.setSize(500, 500); this.setVisible(true); } } { public Lamina() { this.add(amarillo); this.add(rojo); this.add(azul); } { { this.putValue("color_de_fondo", c); } @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 } } }