Question

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

Join Date: Sep 2005
Posts: 11
Reputation: Chipsncoke is an unknown quantity at this point 
Solved Threads: 0
Chipsncoke Chipsncoke is offline Offline
Newbie Poster

Question

 
0
  #1
Jan 26th, 2006
What is the advantage of writing the button as a seperate class.
Like
  1. private class button implements ActionListener
  2. {
  3. public void actionPerformed (ActionEvent e){
  4. {
  5. }

chipsncoke
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Question

 
0
  #2
Jan 26th, 2006
Modularity. That way you can use it in many places without having duplicate code.
It also keeps your classes small, which makes the code easier to read and maintain.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 18
Reputation: N[e]tt[e] is an unknown quantity at this point 
Solved Threads: 0
N[e]tt[e] N[e]tt[e] is offline Offline
Newbie Poster

Re: Question

 
0
  #3
Jan 28th, 2006
em.. i not really sure the advantage..
i juz noe.. it will mix up wif the other coding in e same class.. makin the whole process beta?
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



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC