Java Newbie questions –
Is there a generally followed naming convention for the labels, fields and other components on a Matisse form?
Do most developers use the default names or modify them to make the code more readable?
Is there any downside to changing the names?
There is no downside to changing them, but try and do it when you create them then leave them along, renaming them from the form doesn’t do a refactor operation yet, so if you are using the veriable a lot of places in code (like listener implementations) that could become a problem.
I always change the names to something useful. For example nameLabel, nameCheckBox, nameTextField, okButton, cancelButton, browseButton. I always append the name of the Swing type after the name of what the control does, sometimes it leads to really long names, but I prefer more descrip code over short names that are hard to decode. I hate seeing things like rsvButton, or lktCheckBox… I have no idea what that means if it’s not my code and just makes my life harder as a developer. So from time to time I’ll have something like userPaidInDollarsCheckBox, but atleast the developer that comes behind me to work on that code knows exactly what it does 😉