New to java, but seasoned in other languages like C++. Anyway, first time
using Netbeans for java.
When using the gui designer to place a text component in a dialog, I get a
default "JTextField1" name for it from the gui designer. so far, so good.
But when I rename it to something else like "Username" in the "name" field,
the change is not made in the source. However, when I right click the
JTextField component and do "change variable name", it changes the source
code *and* name field correctly. Is this a bug in the IDE or am I
misinterpreting the use of the "name" field in the properties box?
No big deal ... I just need to use the right-click method to change the
name, but I would like to verify this behavior is not just my install of it,
or anything else I might be overlooking about the behavior of the gui
developer. TIA
I think you want "change variable name". "name" is/can be used for other
things then unique identification.
--
Sabine Dinis Blochberger
Op3racional
www.op3racional.eu
> I am using NB6.9.1 and I am getting exactly the same "problem", any solution?
Amplifying on Sabine Dinis Blochberger's helpful response earlier in
this thread [1], "name" is an attribute of all Components [2]. AFAIK,
it doesn't affect the appearance or function of the Component in any
way. I can't recall using it except to differentiate among instances
while tracing execution. In contrast, the thing modified by "Change
Variable Name..." is the identifier used to refer to a Component in the
generated source code.
I see this as a useful distinction rather than a "problem". Can you
elaborate?
[1]<http://groups.google.com/group/comp.lang.java.gui/browse_frm/thread/123bf70c2a673eec>
[2]<http://download.oracle.com/javase/6/docs/api/java/awt/Component.html#getName()>
--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>