An question that was brought to my mind when programming with Swing in Java was, is it a recommendation or an "official"/most used naming convention(prefix) on Swing components.
Such as(even though other may prefer other naming conventions this is what I am currently using):
But then my list ends..
I think such prefixes enhance the readability in my code so, but I do not have any names for components such as JComboBox, JList, JRadioButton, JCheckButton and so the list goes on.
Thanks in advance.
@maartinus - Following the convention that the repeating consonants are also removed, the prefix for the checkbox-type widgets should be 'chk'.
Methods should be verbs, in mixed case with the first letter lowercase, with the first letter of each internal word capitalized. Except for variables, all instance, class, and class constants are in mixed case with a lowercase first letter. Internal words start with capital letters.
Interface Name: Should start with uppercase letter and be an adjective e.g. Runnable, Remote, ActionListener etc. Method Name: Should start with lowercase letter and be a verb e.g. actionPerformed(), main(), print(), println() etc. Package Name: Should be in lowercase letter e.g. java, lang, sql, util etc.
source -: http://zuskin.com/java_naming.htm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With