usage of action and setText for a component

Swing Designer allows you to quickly create the frames, panels, dialogs, applets and other UI elements that comprise Java Swing applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

usage of action and setText for a component

Postby mkornatzki » Mon Jun 22, 2009 1:02 am

Hi,

i guess the following behavior is a bug:

1. i have a checkbox and set a text.
2. adding an action removes the text (OK)
3. i want to set the text with the property editor. the text gets set before the action. it should be set after the action to work!

regards,
michael
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: usage of action and setText for a component

Postby Eric Clayberg » Mon Jun 22, 2009 4:28 am

That is not a bug. It is working exactly as intended.

If you have an Action assigned to the checkbox, you need to change the "name" property of the Action in order to change the text of the checkbox.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: usage of action and setText for a component

Postby mkornatzki » Mon Jun 22, 2009 4:56 am

i only thought that if i can set the text in the property editor after assigning an action then the text should be inserted in source after the action otherwise you didn't have to delete the text if one add the action.
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: usage of action and setText for a component

Postby Eric Clayberg » Mon Jun 22, 2009 5:30 am

Changing a property updates it in place and does not alter the order of assignment. You can try deleting an re-adding either property.

You can also change the order of assignment in the source, and it will be preserved during subsequent edits.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to Swing Designer

Who is online

Users browsing this forum: No registered users and 1 guest