Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5014750

JDialog bidi string title orientation is different between Solaris and Win2k

XMLWordPrintable

    • Fix Understood
    • generic
    • generic

      Setting the title with a component extending from JDialog with a bidi string, I noticed that the orientation is either RTL or LTR depending what OS you are using. Shouldn't the orientation be the same? See picture attached.

      Looking through the JDialog src, I noticed that the title is being passed straight into an awt Dialog. May this be the reason why the orientation of the bidi string is not correct or supported, but shouldn't it be since it's is a JDialog?

      See test code below and picture attached.
      ----------------------------------------------------------------------------
      import java.awt.*;
      import java.awt.event.*;
      import javax.swing.*;


      public class jDialogTest implements ActionListener {
          String title = "\u05d4\u05e6\u05d2\u05d4\u0020\u062a\u0628\u064a\u064a\u0646";
          JFrame frame;

          public jDialogTest() {
              frame = new JFrame(title);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

              JButton showDialog = new JButton("Click here to see a dialog...");
              showDialog.addActionListener(this);
              showDialog.setActionCommand("show");
              frame.add(showDialog);
              frame.pack();
              frame.setVisible(true);
          }

          public static void main(String[] args) {
              new jDialogTest();
          }

          public void actionPerformed(ActionEvent e) {
              String command = ((JButton)e.getSource()).getActionCommand();

              if (command.equals("show")) {
                  JOptionPane.showConfirmDialog(frame, "Testing title", title,
                                                JOptionPane.YES_NO_OPTION);
              }
          }
      }

            yan Yuri Nesterenko
            sjchan Steven Chan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: