| Author |
Style for ActionListener
|
Garandi Garandi
Ranch Hand
Joined: Jan 07, 2003
Posts: 192
|
|
Dear Reader, Which style is better OR In First case you have lots of if statements and in second case you have lots of inner class. So which style is better and why? Thank you Garandi
|
 |
Nathan Pruett
Bartender
Joined: Oct 18, 2000
Posts: 4121
|
|
|
I prefer the second because it is more readable, the result of the button press appears close in the code to the button. The only drawback is that there is a small bit of overhead because more classes have to be loaded. This is really pretty negligible amount, though.
|
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
|
 |
Garandi Garandi
Ranch Hand
Joined: Jan 07, 2003
Posts: 192
|
|
Nate, I have been enjoing your comments in Javaranch. Thank you Garandi
|
 |
 |
|
|
subject: Style for ActionListener
|
|
|