Different behaviour of JTextField and other components [message #1561680] |
Tue, 13 January 2015 08:27 |
|
Hello,
when using WindowBuilder for creating a window with Labels, Textfields and Buttons, I'm struggling to understand, why:
Creating a new JTextField in Design-mode adds
private JTextField tfArtikelnr
to the attributes (right below class declaration)
while
creating any other component (e.g. label) adds
JLabel lblOne = new JLabel("One:");
inside the constructor of the class and not the attributes.
This behaviour is problematic when trying to modify the label in the button-Action.
Error: Cannot refer to a non-final variable ... inside an inner class...
|
|
|
|
Re: Different behaviour of JTextField and other components [message #1587218 is a reply to message #1564535] |
Tue, 27 January 2015 07:55 |
|
Thanks a lot!
I agree on the different roles of labels and textfields, even though in our project it is necessary to access and change both.
I didn't know that it is possible to configure this behaviour. That would do for me.
I have read through the WindowBuilder Docs (if eclipse.org/windowbuilder/documentation.php is what you mean), but I couldn't find any hints on configuration.
Could you tell me, what to look for?
Thanks.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03267 seconds