hey guys
i am developing a game...
in which when i press a button it has to change its color...
so , i created button, used action listener to it...
if(ae.getActionCommand().equals("b1")) // here b1 is the button
{
b1.setBackground(Color.black);
frame.invalidate();
frame.validate();
System.out.println("button b1 pressed...!!!");
}
i also used
panel.revalidate();
repaint();
but of no use.....
so what to do.... please suggest any idea for this...