You could define a method like
private void enableLength(boolean enable){
txtLength.setEnabled( enable );
lblLength.setEnabled( enable );
}
so your if() code becomes
if (optBox.isSelected() ){
enableLength(true);
}
That would be a little clearer to follow and a bit less repetition. You would have one method for each of your dimensions.
Moderator
Featured Poster
Reputation Points: 3239
Solved Threads: 839
Posting Genius
Offline 6,761 posts
since May 2007