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

IllegalComponentState exception thrown from mouse-drag and page-up key

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.2.2
    • client-libs
    • beta
    • x86
    • windows_nt



      Name: skT88420 Date: 01/21/2000


      java version "1.2.2"
      Classic VM (build JDK-1.2.2-W, native threads syncjit)

      1. Run the following code which opens a table. The editor starts with one click.
      2. Press and hold the page-up key.
      3. While still holding down the page-up key, click on the last row in the table
      and drag upwards.

      IllegalComponentStateException


      //code
      import javax.swing.*;
      import javax.swing.table.*;

      public class PageUpTable {
          public static void main(String args[]) {
              JFrame frame = new JFrame();
              JTable table = new JTable(5,1);
              DefaultCellEditor editor = new DefaultCellEditor(new JTextField());
              editor.setClickCountToStart(1);
              table.getColumnModel().getColumn(0).setCellEditor(editor);
              JScrollPane scroll = new JScrollPane(table);
              frame.getContentPane().add(scroll);
              frame.pack();
              frame.show();
          }
      }
      (Review ID: 100242)
      ======================================================================

            pmilnesunw Philip Milne (Inactive)
            skonchad Sandeep Konchady
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: