This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 128897 - Set Action erases text property
Summary: Set Action erases text property
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: App Framework (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-01 02:19 UTC by mwiles722
Modified: 2008-08-06 04:27 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mwiles722 2008-03-01 02:19:52 UTC
Steps to duplicate:

Create a new Java Desktop Application
Drag a JButton onto the form
Right click=>Properties set the text value to anything (i.e. "Click Me!")
Now Right click on the button and click on Set Action
Select create new action from the drop down list
Fill in the form's action method and hit ok.

The text that you had typed disappeared.  This was probably the first bug I found when writing code for my Java class. 
I am a newbie programmer to Java, so I wasn't initially aware that I had to type my text value into the Text box under
Basic Attributes.  This value should automatically pull from the properties of the JButton (or whatever other control)
that you right clicked on.  All other fields that can be simultaneously set in both the Properties window and the Set
Action dialog box should also automatically be populated as well.  It is a very easy bug to work around once you are
aware of it.  However, it took me an extra 10 minutes or so to figure out what happened to the text.
Comment 1 Jana Maleckova 2008-03-03 13:25:28 UTC
Firstly: This behavior is as designed. You doesn't fill any text during action creation and therefore no text is loaded
for button from resources. 

This is more enhancement than bug.
Comment 2 Jan Stola 2008-03-03 13:35:51 UTC

*** This issue has been marked as a duplicate of 80967 ***
Comment 3 Jana Maleckova 2008-03-04 08:40:13 UTC
just for correction.
I will create enhancement for feature you has described in the second part of your description. It's good idea
Comment 4 Jana Maleckova 2008-07-24 14:50:03 UTC
the number of enhancement is 129085 ... just for clarification
Comment 5 Jiri Vagner 2008-08-05 15:34:46 UTC
Now manually set properties like text, icon, mnenonic, ... will not be overwritten while setting new javax.swing.Action
property value.
Comment 6 Jiri Vagner 2008-08-05 15:46:16 UTC
Fixed

Modified files: http://hg.netbeans.org/main/rev/74a2f5d4a7ef
Comment 7 Quality Engineering 2008-08-06 04:27:48 UTC
Integrated into 'main-golden', available in build *200808060201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/74a2f5d4a7ef
User: Jiri Vagner <jvagner@netbeans.org>
Log: #128897 - Manually set properties will not be overwritten by action