package disici; import java.awt.Color; import java.awt.event.*; import javax.swing.*; public class aaa implements ActionListener{ private static final Color Color = null; JFrame f; JPanel p; JButton b; JLabel l1; public aaa() { f = new JFrame(); p = new JPanel(); b = new JButton ("change"); l1= new JLabel() ; b.addActionListener(this); f.add(p); p.add(b); p.add(l1); f.setSize(400,300); f.setVisible(true); } public void actionPerformed(ActionEvent arg0) { p.setBackground(Color.pink ); } public static void main(String[]args) { new aaa(); } }