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

GUI containing JTextField becomes un-responsive on pressing the Home key

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 7u45
    • client-libs

      FULL PRODUCT VERSION :
      java version "1.7.0_45"
      Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
      Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      If you enter a very large string(50000) characters, then press the Home key, the GUI becomes unresponsive.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      run the attached code
      type a very big string(50,000 charachters) in the first text field
      press home key
      Now the GUI remains frozen for some time.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The GUI should not freeze.
      ACTUAL -
      The GUi is frozen

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.awt.Dimension;
      import java.awt.GridLayout;

      import javax.swing.JFrame;
      import javax.swing.JPanel;
      import javax.swing.JTextField;


      public class JTextFieldBug{

      public static void main(String[] args){

      JTextField f1 = new JTextField(30);
      JTextField f2 = new JTextField(30);
      JTextField f3 = new JTextField(30);
      JTextField f4 = new JTextField(30);
      JTextField f5 = new JTextField(30);

      JPanel p = new JPanel(new GridLayout(5,1));

      p.add(f1);
      p.add(f2);
      p.add(f3);
      p.add(f4);
      p.add(f5);

      JFrame frame = new JFrame();



      frame.add(p);
      frame.pack();
      frame.setSize(new Dimension(1000,400));
      frame.setVisible(true);
      }

      }

      ---------- END SOURCE ----------

            alexsch Alexandr Scherbatiy
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: