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

inline input not visible with white foreground

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 6
    • client-libs
    • None
    • 2d
    • b33
    • generic
    • solaris_9

      When using on-the-spot editing via the InputMethod to enter any Asian character in a TextField and the Foreground is set to white, the highlighted text can not be seen as it is highlighted with the white color.

      This happens on solaris with the java input method. Same on Windows seems to work fine. System input method seems to work OK too.

      To reproduce:

      * set LANG to any Asian locale
      * Enable some java input method (I tested with CityIM.jar)
      * run the test below

      Result: Only white boxes are seen when entering data (before Enter is pressed)


      import javax.swing.*;
      import java.awt.*;
      import java.awt.event.*;

      public class TextFocus extends JFrame {

      public TextFocus() {
             getContentPane().setLayout(new FlowLayout());
             textMsg();
             setSize(150,50);
             setVisible(true);
      }

      public void textMsg() {
             JTextField txtFld = new JTextField(10);
             txtFld.setBackground(Color.gray);
             txtFld.setForeground(Color.white);
             getContentPane().add(txtFld);


      }

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

            dougfelt Doug Felt (Inactive)
            ksoshals Kirill Soshalskiy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: