Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~302 People Reached
Favorite Forums
Favorite Tags
Member Avatar for ashsailesh

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... [CODE] if(ae.getActionCommand().equals("b1")) // here b1 is the button { b1.setBackground(Color.black); frame.invalidate(); frame.validate(); System.out.println("button b1 pressed...!!!"); } [/CODE] i also used …

Member Avatar for hfx642
0
179
Member Avatar for ashsailesh

i am using an array of JButtons b[23].... my objective is that when i click a button it has to change its background color to black but it is giving a nullpointer exception.... if(ae.getActionCommand().equals("0")) { System.out.println("button b[o] is pressed"); b[0].setBackground(Color.black); } } can anyone help me with this please........

Member Avatar for hfx642
0
123