Something about Graphics

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: May 2007
Posts: 4,483
Reputation: Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of 
Solved Threads: 515
Moderator
Featured Poster
Ezzaral's Avatar
Ezzaral Ezzaral is offline Offline
Industrious Poster

Re: Something about Graphics

 
0
  #11
Aug 1st, 2008
Yes, it's just providing an anonymous inner class implementation of JPanel on initialization. You have probably seen it before with action listeners, Comparators, Runnables that are being handed off to a thread, etc.
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 412
Reputation: sciwizeh is on a distinguished road 
Solved Threads: 22
sciwizeh's Avatar
sciwizeh sciwizeh is offline Offline
Posting Pro in Training

Re: Something about Graphics

 
0
  #12
Aug 1st, 2008
yes, but i haven't seen it used to override paintcomponent(), would it work with paint()? (i assume so)
My site, random PM's from people I haven't hear from before will be DELETED
"If people are good only because they fear punishment, and hope for reward, then we are a sorry lot indeed.",
"If we knew what it was we were doing, it would not be called research, would it? "
-Albert Einstein
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 4,483
Reputation: Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of 
Solved Threads: 515
Moderator
Featured Poster
Ezzaral's Avatar
Ezzaral Ezzaral is offline Offline
Industrious Poster

Re: Something about Graphics

 
0
  #13
Aug 2nd, 2008
Sure, it's not limited to specific methods, though if you are wanting to override quite a few or manage complex state, it is usually better to just go ahead and declare a normal inner class (or top-level if it would be useful outside the context of the containing class).

Often anonymous inner classes are used for "function objects" that specify a single method implementation, like actionPerformed() for a button listener. Such usage can be considered similar to function pointers in C++.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 36
Reputation: esy928 is an unknown quantity at this point 
Solved Threads: 0
esy928 esy928 is offline Offline
Light Poster

Re: Something about Graphics

 
0
  #14
Aug 4th, 2008
wow! thanks dude! im gonna go rewrite my code now =)
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 36
Reputation: esy928 is an unknown quantity at this point 
Solved Threads: 0
esy928 esy928 is offline Offline
Light Poster

Re: Something about Graphics

 
0
  #15
Aug 4th, 2008
im gonna ask something off topic here, how can i add an option to play again? thanks!
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 412
Reputation: sciwizeh is on a distinguished road 
Solved Threads: 22
sciwizeh's Avatar
sciwizeh sciwizeh is offline Offline
Posting Pro in Training

Re: Something about Graphics

 
1
  #16
Aug 4th, 2008
well you could write a method that clears everything and chooses a new word
My site, random PM's from people I haven't hear from before will be DELETED
"If people are good only because they fear punishment, and hope for reward, then we are a sorry lot indeed.",
"If we knew what it was we were doing, it would not be called research, would it? "
-Albert Einstein
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 36
Reputation: esy928 is an unknown quantity at this point 
Solved Threads: 0
esy928 esy928 is offline Offline
Light Poster

Re: Something about Graphics

 
0
  #17
Aug 5th, 2008
thank you for helping me sciwizeh!
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1
Reputation: kimslov is an unknown quantity at this point 
Solved Threads: 0
kimslov kimslov is offline Offline
Newbie Poster

Re: Something about Graphics

 
-1
  #18
Aug 5th, 2008
The graphics are very entertainment to all and with hollywood tstudio movies presents 3d graphics.
<snip false signature>
Last edited by Ancient Dragon; Aug 5th, 2008 at 1:16 pm. Reason: snip false signature
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC