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 195247 - Text for JRadioButtonMenuItem.setText(resourceMap.getString("menuItem.text")) is never visible if added via GUI builder. User must input .setText("DESIRED TEXT") for it to be visible
Summary: Text for JRadioButtonMenuItem.setText(resourceMap.getString("menuItem.text"))...
Status: RESOLVED WONTFIX
Alias: None
Product: guibuilder
Classification: Unclassified
Component: App Framework (show other bugs)
Version: 6.x
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords: UI, USABILITY
Depends on:
Blocks:
 
Reported: 2011-02-09 19:18 UTC by MrP1us
Modified: 2012-04-18 13:00 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Sample Project (365.04 KB, application/x-zip-compressed)
2011-02-14 16:36 UTC, MrP1us
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MrP1us 2011-02-09 19:18:11 UTC
Product Version = NetBeans IDE 6.9.1 (Build 201011082200)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.6.0_23
Runtime = Java HotSpot(TM) 64-Bit Server VM 19.0-b09
Comment 1 Tomas Pavek 2011-02-11 17:39:02 UTC
Please provide steps to reproduce the problem, best would be to also attach a sample project here. Setting text via resource map normally works, so it is hard to tell what is wrong in your case just from one sentence.
Comment 2 MrP1us 2011-02-14 16:36:14 UTC
Created attachment 105983 [details]
Sample Project

Steps I took to get this bug were:
Created the project from the Desktop Application template
Added the Options menu via the GUI builder
Added the first menu item via the GUI builder
Copied the first menu item and pasted the the next 2
Changed the text via 'Edit text'
Added code to manage the button state

The attached project is the one with the bug.
Comment 3 CorrugatedAir 2011-04-01 23:23:13 UTC
I was also having this issue. I created a JPopupMenu through the GUI and added some menu items. I set the menu items' text through the GUI, but it's blank when you display the menu.

If I uncheck the "Define as Resource" option, it works fine. The autogenerated code for my menu item (when defined as a resource) includes this:

itemSetThreshold.setText(resourceMap.getString("itemSetThreshold.text"));

When I went through it with the debugger, resourceMap.getString("itemSetThreshold.text") is set to null. 

However, when I did "Clean and Build", it fixed it.
Comment 4 Jan Stola 2012-04-18 13:00:11 UTC
I am not sure how the project got into this state but Clean and Build fixes the problem.

Anyway, this issue is related to Swing Application Framework whose support has been discontinued in NetBeans 7.1 => I am closing this issue as 'will not fix'.