943,928 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1127
  • Java RSS
Jan 26th, 2006
0

Question

Expand Post »
What is the advantage of writing the button as a seperate class.
Like
Java Syntax (Toggle Plain Text)
  1. private class button implements ActionListener
  2. {
  3. public void actionPerformed (ActionEvent e){
  4. {
  5. }

chipsncoke
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Chipsncoke is offline Offline
11 posts
since Sep 2005
Jan 26th, 2006
0

Re: Question

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.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Jan 28th, 2006
0

Re: Question

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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
N[e]tt[e] is offline Offline
18 posts
since Feb 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Eclipse plugins help
Next Thread in Java Forum Timeline: jdbc help?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC