<Swing Dev> [9] Review Request: 8073795 JMenuBar looks bad under retina

Alexander Scherbatiy alexandr.scherbatiy at oracle.com
Thu Feb 26 12:01:45 UTC 2015


  The fix looks good to me.

  Thanks,
  Alexandr.

On 2/25/2015 5:21 PM, Sergey Bylokhov wrote:
> Hello.
> Please review the fix for jdk 9.
> Two issues were fixed:
>  - The problem was described in the JDK-8032219, most of the swing 
> components draw a border using drawLine, with assumption that it will 
> be scaled in the same way as filleRect, this is incorrect. Code now 
> use SwingUtilities2.drawHLine();
>  - The JMenuBar draws its border out of bounds, because it uses width 
> as a line length instead of width - 1.
> It seems that we should update all our components at some point.
>
> Obsolete comments in AquaMenuBarBorder were removed since they just 
> not full version of the parent comments.
>
> The test is tricky. I draw JMenuBar two times, and in the second time 
> I draw a border on top of it, with assumption that this shouldn't 
> clear/change JMenu items in the menubar(this is true for a standard 
> L&F's).
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8073795
> Webrev can be found at: 
> http://cr.openjdk.java.net/~serb/8073795/webrev.01
>




More information about the swing-dev mailing list