On Sun, 14 Nov 2004 12:38:21 -0500, javacarrot wrote:
> Hi,
Lo,
I started looking at your code and gave up in disgust..
Well, not really. But after putting in effort to correct the
lines broken by line wrap, then compile and run it, it was not
immediately clear what your classes, methods and attributes were
since you seemed to follow an unconventional indentation strategy,
and did not stick to the common nomenclature. I might have fixed
it to the point where (even my addled brain) could understand it,
but could not be bothered.
Some tips for you though..
- Use the nomenclature that other Java programmers use..
ClassName, methodName(), attributeName (unless it is a CONSTANT).
- Never compare your strings with '==', instead use..
if ( theFirstString.equals(theSecondString) )
- When you do not know what is happening, put System.out.println
statements *everywhere*. Put them at the beginning and end of each
method, also print out the value of critical attributes, especially
just after they have been set, but also before they are used.
(for example, your itemStateChanged code is never invoked.)
- You seem to sub-class various components for no apparent reason, don't.
(Your TypeInfoComboBox *is* a JComboBox, so use a JComboBox and be
done with it)
- Check my document on preparing examples for others to see..
<http://www.physci.org/codes/sscce.jsp>
you will get more, and better help, if people do not have
to invest effort to get it to run.
- Consider posting to a group more geared to your level..
<http://www.physci.org/codes/javafaq.jsp#cljh>
- Don't end your subject line with !!! as it makes you appear 'needy'.
HTH
--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane