I have a fairly simple Applet which i have finished (still figuring out how to get it to run in a browser, but i have all the functionality finished). It communicates with a database i have set up in MySQL. However, the class has a very large amount of lines and i just dont feel comfortable with the length. Its around 1400 lines.
I used windowbuilder in Eclipse for the GUI which takes around 700 lines. Its got multiple tabs and lots of buttons etc. Then i have around 18 methods which are basically get and set methods for the database. I have cut it down as much as i can in terms of redundant code. However, im just wondering if you gurus know how i can reduce the size?
Am i right in concluding that splitting up the GUI from my main applet class would cause a problems with accessing GUI components? The app constantly changes and updates the GUI with information from the DB.
I feel i understand OO concepts but because this is just a 'questionnaire' and nothing more, i am unsure on how to reduce the size. ANY info would be great!!
Dale Bradley wrote:I have a fairly simple Applet which i have finished (still figuring out how to get it to run in a browser, but i have all the functionality finished).
Without knowing the details only general pieces of advice can be given, but it is usually a good idea to break down the program into parts,
meaning not only methods but in the OO case also several classes. They can then be bundled into a jar.