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

On MAWT TextArea, cursor keeps blinking after focus moved to a native window.

XMLWordPrintable

    • b14
    • x86
    • linux
    • Verified

        Reproduced on Redhat Enterprise Linux 4 (Update 4) with 1.6.0-b105.

        On MAWT TextArea or TextField, cursor keeps blinking after focus moved to a native window.

        Test instruction is as follows:
        1. Compile and launch the sample code with MToolkit.
        $ javac TextAreaTest
        $ AWT_TOOLKIT=MToolkit java TextAreaTest
        => Two TextArea components will appear.

        2. Move focus to "TextArea 1".

        3. Move focus to another native window, like terminal.
        => Cursor is still blinking. <= Problem.

        4. Move focus from the native window to "TextArea 2".
        => Both TextArea 1 and 2 show blinking cursor. <= Problem.

        Expected result:
        Cursor should be pale color and stop blinking, after focus loses.

        Focus change between these TextArea components, it works as expectedly.

        Additional Information:
        Motif's text widget doesn't get FocusOut event.

        The problem didn't occur on Java5. It introduced from Java6.

        ======== TextAreaTest.java ====================================
        import java.awt.*;
        public class TextAreaTest {
                public TextAreaTest(String title) {
                        Frame frame = new Frame(title);
                        frame.add(new TextArea());
                        frame.setSize(300, 100);
                        frame.setVisible(true);
                }
                public static void main(String[] args) {
                        TextAreaTest t1=new TextAreaTest("TextArea 1");
                        TextAreaTest t2=new TextAreaTest("TextArea 2");
                }
        }

              ant Anton Tarasov (Inactive)
              elarsen Erik Larsen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: