Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 changing an icon in a button
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
raffyquinto




PostPosted: Sat Mar 07, 2009 10:00 pm   Post subject: 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...
.
.
.
Question
Sponsor
Sponsor
Sponsor
sponsor
andrew.




PostPosted: Sun Mar 08, 2009 11:44 am   Post subject: RE:changing an icon in a button

Shouldn't this be in the Java help section?
md




PostPosted: Sun Mar 08, 2009 12:11 pm   Post subject: RE:changing an icon in a button

Moved.
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: