On Thu, 27 Nov 2025 12:32:22 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

> Issue is icon in JOptionPane is not aligned as per the Component Orientation 
> in Motif LookAndFeel.
> It seems only the buttons are aligned as per component orientation whereas 
> the icon is not.
> 
> It is because the icon is drawn at "West" constraint whereas it should be 
> drawn at beginning of line as done in BasicOptionPaneUI to ensure component 
> orientation is honoured.

test/jdk/javax/swing/plaf/motif/TestIconRTL.java line 35:

> 33: import java.awt.ComponentOrientation;
> 34: import java.util.HashMap;
> 35: import java.util.Map;

Unused imports.

test/jdk/javax/swing/plaf/motif/TestIconRTL.java line 44:

> 42: import javax.swing.SwingUtilities;
> 43: import javax.swing.UIManager;
> 44: import javax.swing.UnsupportedLookAndFeelException;

Unused import.

test/jdk/javax/swing/plaf/motif/TestIconRTL.java line 53:

> 51:     static final String INSTRUCTIONS = """
> 52:         A JOptionPane is shown in Motif LookAndFeel.
> 53:         Test with LTR and RTL Orientation

Adding the instructions on where to change the Orientation would bring more 
clarity. Since user can change from Menubar, it would be better to add that 
note.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28532#discussion_r2601206300
PR Review Comment: https://git.openjdk.org/jdk/pull/28532#discussion_r2601205756
PR Review Comment: https://git.openjdk.org/jdk/pull/28532#discussion_r2601204508

Reply via email to