I think a lot of this is definately a question of personal programming
style, but I'm new to Java and would like to hear a few opinions.
I'm writing a control panel for an application that runs separately. The
control panel is basically (almost) fully self contained. It consists of a
tabbed pane with 5 different tabs. Each tab has a number of different
controls -- basically all the "commonly used" controls (buttons, lists,
comboboxes, text input...). For a number of components it is easiest for
me to use anonymous or other inside classes. I'm also using private
classes (each tab pane is created by a private class in the same file as
the main GUI class).
So for a project like this, do most people write the code for the entire
window as 1 class, or a separate class for each panel? Is there any kind
of guideline about when a class gets too big? It seems to me any class
creating a window and adding controls will be rather large, since so many
things are done for each component (specifying min, max & preferred size,
adding listeners, specifying list objects, etc), so I would think almost
any class that contains a window would be big anyway.
So how would other people determine what goes in one class and in another,
or if they use private classes in a case like this?
Thanks!
Hal