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.
It is not possible do set the Title of a TitleBorder via the ResourceBundle support in the property inspector.
Please, specify exactly what doesn't work. The title of TitleBorder can be specified using ResourceBundle support: 1. Select the component that has this border assigned. 2. Go to Properties window and press the '...' button next to the border property -> border property editor is shown. 3. In the Properties section of the property editor press the '...' button next to the title property -> string property editor is shown. 4. Select 'Resource Bundle' in the Select Mode combobox and specify the information about the location of the resource bundle, key etc.
Created attachment 19201 [details] SWF video
Hi Jan, take a look at the attached video to see how it works (not). Heiko Wenzel
Great video! Thank you. Finally I was able to reproduce this issue. The problem seems to be in the property sheet - it calls propertyEditor.setValue() when the property sheet is repainted: at PropUtils:924 at PropUtils:866 at ReusablePropertyModel:64 at RendererFactory:196 at RendererFactory:115 at SheetCellRenderer:111 "TitledBorder" dialog in the attached example hides the property sheet. When this dialog is closed then the property sheet is repainted and incorrect (old) value is set to border property editor => no border is set when "jPanel2 [JPanel] - border" dialog is closed. Reassigning to property sheet. Note that this problem occurs for all custom editors, for example: 1. Open properties of java method. 2. Open modifiers custom editor. 3. (Un)check some checkboxes in the modifiers dialog. 4. Force repaint of the property sheet (e.g. move the modifiers dialog over the property sheet and back). 5. Note that the changes in the modifiers dialog has been reseted.
Thanks for nice analysis and straightforward steps to reprodue. Lowering priority to P2. It is IMO happening only in very rare cases - on specifically positioned PS and mainly on low screensize resolutions (this is probably reason why it hasn't been discovered until now. As a workaround you can make PS narrower in a way that property editor and following dialog(s) don't overlap the underlaying property sheet (the base one - under the explorer on your video).
Fixed in trunk Checking in openide/src/org/openide/explorer/propertysheet/CustomEditorAction.java; /cvs/openide/src/org/openide/explorer/propertysheet/CustomEditorAction.java,v <-- CustomEditorAction.java new revision: 1.13; previous revision: 1.12 done Checking in openide/src/org/openide/explorer/propertysheet/PropUtils.java; /cvs/openide/src/org/openide/explorer/propertysheet/PropUtils.java,v <-- PropUtils.java new revision: 1.46; previous revision: 1.45 done
*** Issue 55086 has been marked as a duplicate of this issue. ***
*** Issue 56575 has been marked as a duplicate of this issue. ***
jwiles from DUPLICATE issue 56575. Maybe this should be listed as a new issue because this occured under NB 4.1 beta this time (JRE 1.4.2_07)? I tried to add a JPanel to a JSplitPane and edit the properties of the JPanel with the following results: Attempt #1 1. click on "..." button of "border" property on the property sheet -> get the Border Editor property sheet. 2. select "TitledBorder" in the Border Editor -> properties for TitledBorder show in lower half of sheet, however "Border" property still indicates (No Border); should probably indicate TitledBorder. 3. click on "..." button of the "Border" property Border Editor -> get another Border Editor property sheet with "Border" property still indicating "(No Border)" -> weird 4. close latest Border Editor property sheet to see original Border Editor with correct Border property -> weirder. 5. add a string to the "Title" property -> "Title" property is bolded 6. click on "..." button of the "Font" property and select Arial 11 Bold -> "Font" property is bolded 7. click on "OK" button at the bottom of the Border Editor -> JPanel reverts back to default settings with (No Border) and Tahoma 11 Plain font -> lame Attempt #2 1. click on "..." button of "border" property on the property sheet -> get the Border Editor property sheet. 2. select "TitledBorder" in the Border Editor -> properties for TitledBorder show in lower half of sheet, however "Border" still indicates (No Border) 3. ignore the incorrect "Border" setting and add a string to the "Title" property -> "Title" property is bolded 4. click on "..." button of the "Font" property and select Arial 11 Bold -> "Font" property is bolded 5. click on "OK" button at the bottom of the Border Editor -> JPanel is properly formatted! While I finally got the JPanel I wanted, it wasn't the most intuitive path. First, the Border property of the Border Editor should have had the setting that the that I originally selected, "TitledBorder". Second, maybe don't have the "..." button next to the Border property in the Border Editor, because clicking on this brings up yet another Border Editor, and nothing can go right from there. I imagine that among the multiple Border Editor instances, the settings get lost along the way, which is why my first attempt didn't work. Perhaps have the Border property depend on the selection in the upper portion of the Border Editor and update the fields as necessary? By the way, I opened up the Border Editor on a JPanel that has already been formatted and the only setting that did not match was the Border property (listed as No Border).
work-around for 4.0: I found that if I changed the font first and added the title string last (selecting <enter> after the string was set), the TitledBorder settings took. -> Some weird focus stuff going on?
Really strange bug. Anyway thanks for detailed steps for reproduction. > 2. select "TitledBorder" in the Border Editor -> properties for > TitledBorder show in lower half of sheet, however "Border" property > still indicates (No Border); should probably indicate TitledBorder. This is bug in repainting mechanism of PropertySheet. When you move (border) property editor over the main property sheet and back the value gets correctly repainted. There is similar issue already filled. It seems it is all entangled together. The original property sheet probably didn't take into account such a theoretically endless overlapping of property sheets. > 7. click on "OK" button at the bottom of the Border Editor -> JPanel > reverts back to default settings with (No Border) and Tahoma 11 > Plain font -> lame However I'm able to reproduce this *only* if I force to repaint, at least once, the main property sheet (which is swiching between NetBeans and other applications or by moving border property editor over the main property sheet), which is not so common. Is the same apply to you? (latest dev build however) ....started....
I've just tried it with the latest build on the Windows as well as Linux. The main problem gone and the steps you described works correctly. At least the last (main) step sets border as it shall. The better behaviour is due to some fixes since beta. However the repainting problem still remains and in an extreme situation the problem can still be reproduced. So lowering to P3. Maybe this issue should be divided into two smaller issue.... Current steps to reproduce: To reproduce you *must* move the second property sheet (first title border editor) which probably nobody does. Moreover only if you recursively popup second *title*border editor (third property sheet) and close/cancel it. I know where the problem approximately is but still don't have reasonable fix.
Possibly find the Node.Property in question and make sure it does *not* cache its property editor? Or make sure it does? What I suspect is happening here is: One property sheet has a modified value being edited. The other property sheet shows the same value. So, when the second property sheet repaints, it's calling property.getPropertyEditor().setValue(property.getValue()) - clobbering the edit in progress. Anyway, this is a real corner case, probably P4
Not for 4.1. TM > future
HR started. TM > 4.2 However main problems of this issue are fixed in 4.1 and even reproducing of the issue is not so easy now > P4
a lot of changes in property editors/sheet needed for this fix
NetBeans.org Migration: changing resolution from LATER to WONTFIX