<Swing Dev> RFR JDK-8239907: Vertical White Line appears with JOptionPane.showMessageDialog using a JTextPane/JEditorPane

Prasanta Sadhukhan prasanta.sadhukhan at oracle.com
Thu Jul 9 08:36:26 UTC 2020


Hi All,

Please review a fix for an issue where a white line artifact is 
appearing in JOptionPane.showMessageDialog,

This issue is a regression of JDK-8098835 where the caretMargin is added 
to TextPane width in getMaximumSize/getMinimumSize/getVisibleEditorRect

The present issue stems from the fact that the visibleEditorRect() 
actually subtracts the caret margin instead of adding to the text pane 
width.

Proposed fix is to add the caret margin width rather than subtracting, 
to the actual width.

Bug: https://bugs.openjdk.java.net/browse/JDK-8239907

webrev: http://cr.openjdk.java.net/~psadhukhan/8239907/webrev.0/

Regards
Prasanta


More information about the swing-dev mailing list