<Swing Dev> JSeparator rendered incorrectly on Windows 7

Alex Lam S.L. alexlamsl at gmail.com
Tue Apr 3 18:53:39 UTC 2012


Hi there,

I have found the cause of the problem - the difference between
JSeparator and JPopupMenu.Separator.

As I use the GUI builder on NetBeans, I don't know how or when it has
decided to slip in a single JSeparator into the mix.

Attached a simple test case demonstrating the problem, at least on Win7.

It's not a big deal to me now I've discovered the cause, although it
would be nice to know the difference between these two classes...


Regards,
Alex.




On Sun, Apr 1, 2012 at 8:25 PM, Alex Lam S.L. <alexlamsl at gmail.com> wrote:
> Hi there,
>
> I will try and narrow it down to a simple(r) test case and get back to you.
>
>
> Regards,
> Alex.
>
>
>
> On Fri, Mar 30, 2012 at 10:24 AM, Pavel Porvatov
> <pavel.porvatov at oracle.com> wrote:
>> Hi Alex,
>>
>> Can you sent a small separated test? I used SwingSet2 demo with the same
>> Windows and jdk versions and the problem is not reproducible...
>>
>> Thanks, Pavel
>>
>>
>>> Hi there,
>>>
>>> I noticed that in some cases JSeparator would render differently (see
>>> attached photo - first one from the top, left window).
>>>
>>> It is repeatable - I can quit and re-run the app and the same
>>> JSeparator would be wrong. Curiously, I use the preview feature from
>>> NetBeans for the project code which generates this window, and the
>>> problem does not appear there.
>>>
>>>
>>> Confused,
>>> Alex.
>>>
>>> ---------------
>>>
>>> Microsoft Windows [Version 6.1.7601]
>>>
>>> java version "1.7.0_02"
>>> Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
>>> Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)
>>
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MenuSeparator.java
Type: application/octet-stream
Size: 2018 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20120403/dcee56bc/MenuSeparator.java>


More information about the swing-dev mailing list