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 238746 - JSeparator Color
Summary: JSeparator Color
Status: RESOLVED INCOMPLETE
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-25 01:26 UTC by sylvio_neto
Modified: 2013-12-16 10:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sylvio_neto 2013-11-25 01:26:08 UTC
There is a bug on Netbeans 7.4. 

Even you change the color (Background and Foreground) of the JSeparator component, this component persist on the default color. 

The color can't be changed.
Comment 1 Kenneth Ganfield 2013-11-25 16:24:08 UTC
This does not appear to be a usersguide task.
reassigning
Comment 2 Tomas Pavek 2013-11-25 17:14:49 UTC
Is the code of the changed color generated in java source? And you just don't see the color in the designer (if you run on Windows)? Then this is normal. Some look and feels that use native rendering (like the Windows look and feel, for example) ignore colors set on some components - they cannot be painted. Other look and feels may paint the colors for the same component well (e.g. Metal or Nimbus look and feels).
Comment 3 sylvio_neto 2013-11-27 21:51:49 UTC
Thanks for helping.
I tried run netbeans on linux, and the problem continues. When I make a program using only notepad (windows), the problem doesn't persist. So I can change the color normal. 
In Netbeans 6.9 version this problem didn't happen.
Comment 4 sylvio_neto 2013-11-28 00:06:38 UTC
I downloaded Netbeans 6.9.1 and the problem with Jseparator doesn't exist.
Comment 5 Tomas Pavek 2013-11-28 10:31:22 UTC
Please clarify where exactly the problem appears. There can be at least three variants:
1) The color does not change in the GUI Builder design view.
2) The color is not set in the generated source.
3) The color is not changed when the GUI class is run.

Which one is yours? What color exactly do you set?

What I wrote about look and feels is generally true, different look and feels honor the foreground/background colors differently. If the color setting code is generated correctly (2) then there's nothing more we can do.
Comment 6 Tomas Pavek 2013-12-09 16:54:58 UTC
Trying to figure out what "the color can't be changed" actually means (exactly).
Comment 7 sylvio_neto 2013-12-15 01:19:04 UTC
Thanks for answer my question. 

I'm going to try explain. 

The color does not change in the GUI Builder design view , and the color is not changed when the GUI class is run.
Comment 8 Tomas Pavek 2013-12-16 10:02:21 UTC
I'm sorry but still don't know what is happening. For me it is working fine (on Windows 7). I.e. I create a GUI form, add JSeparator, set its foreground - it appears changed both in GUI design and when run. There must be something special with your case, but it's not clear what.

Please answer questions:
1) What exact color do you set? Does it happen with any color?
2) Does the color chooser dialog have OK and Cancel buttons, or just a Close button? (The latter would mean your GUI form is read only and so nothing can be set.)
3) You already wrote the new color is not visible in GUI designer, but is it visible in the property sheet and in the generated code? Is the color visible in the foreground or background property in the property sheet? And the name of the property in bold indicating a change? Is there in the source editor a generated code like jSeparator.setForeground(your_new_color) ?
4) Does this happen with a new GUI form - e.g. newly created JFrame where you add a JSeparator, or is it only one of your forms where it does not work?

Would be great if you could attach a screenshot of the IDE with the JSeparator selected before you set the color, then a screenshot when you are about to confirm the new color, and then how it looks after the new color is entered.