
-----------------------------------
raffyquinto
Sat Mar 07, 2009 10:00 pm

changing an icon in a button
-----------------------------------
i have this problem with changing the icon in my button...
these is the situation

i am making a chinese chess game. i designed my board using JButton so my board is composed of 90 buttons(pure board without any chess pieces). what i want to do is when i would click a button(new game) i want the board to have the chess pieces...

i tried using setIcon(...) but it didn't work... i could not find the error... when i compiled it there is no error but when i run it and click "new game" something like this would apear in the command prompt

Exception in thread"AWT-EcentQueue-0"java.lang.NullPointerException
    at...
    at...
    .
    .
    .
  :?:

-----------------------------------
andrew.
Sun Mar 08, 2009 11:44 am

RE:changing an icon in a button
-----------------------------------
Shouldn't this be in the Java help section?

-----------------------------------
md
Sun Mar 08, 2009 12:11 pm

RE:changing an icon in a button
-----------------------------------
Moved.
