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

JTextField has cursor and focus problem in JWindow.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.2.0
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:

      Description

      JDK Version: 1.2fcs-F
      OS: Solaris 2.6
      Locale: C, zh

      If we add JTextField in JWindow, we find that, we could not see the cursor in
      the JTextField, and the JTextField will easily have a Focus problem, that
      is if we type chars and hilight in it, and after several times, we will find
      that the JTextField will not gain focus any more. Following is a program to
      reproduce it.
      ======================JTextFocus.java=================================
      import java.awt.*;
      import java.awt.event.*;
      import com.sun.java.swing.*;

      public class JTextFocus {
          JWindow win;
          JTextField tf1;
          JTextField tf2;

          public JTextFocus() {
      win = new JWindow();
      tf1 = new JTextField("ABCDEFGH", 10);
      tf2 = new JTextField("12345678", 10);
      win.getContentPane().setLayout(new FlowLayout());
      win.getContentPane().add(tf1);
      win.getContentPane().add(tf2);
      win.pack();
      win.show();
          }

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

      [jim.hu@prc 1998-08-18]

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              svioletsunw Scott Violet (Inactive)
              Reporter:
              jhusunw Jim Hu (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: