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

Regression: Multibyte Text can not be displayed in title bar of JFrame, Message box, and JDialog



    • b47
    • generic, x86, sparc
    • generic, linux, linux_suse_sles_8.2, solaris_9, windows_2003
    • Verified


      This happens on gnome and CDE (X windows system). We use testsuits provided by java sqe team to find i18n bugs by comparing GUIs between latest and old jdk build. In the automated generated testing report, from b35, text in asian languges like S. Chinese, T.Chinese, and Korean can not be displayed on titlebar of java frame, message box and dialogue. This problem does not happen in Mircrosoft OS, though the appearence of the titlebar is a little different from previous version.


      To confirm that this is not a sqe test suite bug. I wrote a small java class to display java message box with S. Chinese text in titlebar. When user click button "push" on the frame, a message box will popup. The text in local language is in the title bar of the message box. Until b34, the text can be displayed on title bar. From b35, the native text can not be displayed on title bar of the message box. This only happens on linux/unix with gnome or cde desktop. The text still can be displayed on windows platform.

      Blow is the source code. The screenshots of message box in b34 and b35 are in the attachment.

       * JFrame1.java
       * Created on

       * @author Administrator

      import javax.swing.*;

      public class JFrame1 extends javax.swing.JFrame {
          /** Creates new form JFrame1 */
          public JFrame1() {
          /** This method is called from within the constructor to
           * initialize the form.
           * WARNING: Do NOT modify this code. The content of this method is
           * always regenerated by the Form Editor.
          // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
          private void initComponents() {
              jPanel1 = new javax.swing.JPanel();
              jOptionPane1 = new javax.swing.JOptionPane();
              jButton1 = new javax.swing.JButton();


              jButton1.addActionListener(new java.awt.event.ActionListener() {
                  public void actionPerformed(java.awt.event.ActionEvent evt) {


              getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);

          // </editor-fold>//GEN-END:initComponents

          private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
              JOptionPane.showConfirmDialog(this,"Welcome","\u4e2d\u6587\u6d4b\u8bd5",JOptionPane.YES_NO_OPTION);// TODO add your handling code here:
           * @param args the command line arguments
          public static void main(String args[]) {
              java.awt.EventQueue.invokeLater(new Runnable() {
                  public void run() {
                      new JFrame1().setVisible(true);
          // Variables declaration - do not modify//GEN-BEGIN:variables
          private javax.swing.JButton jButton1;
          private javax.swing.JOptionPane jOptionPane1;
          private javax.swing.JPanel jPanel1;
          // End of variables declaration//GEN-END:variables
      ###@###.### 2005-05-13 07:49:13 GMT

      It happens on RHAS 4.0 in DE locale. See report at http://sqeweb.sfbay/st3/jdk6.0/i18n/reports/ea/results/b35/i18n-de/RHAS_AMD64-4.0-de.DE-UTF8/GlobalSuite-MS-Report.html

      ###@###.### 2005-05-13 12:18:09 GMT
      ###@###.### 2005-05-13 12:36:44 GMT


        Issue Links



              yan Yuri Nesterenko
              yhuang Yong Huang (Inactive)
              0 Vote for this issue
              4 Start watching this issue