Calling removeEditor on JTable incorrectly forces focus.

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 1.4.0
    • Affects Version/s: 1.1.8
    • Component/s: client-libs
    • beta
    • x86
    • windows_nt



      Name: clC74495 Date: 11/02/99


      I'm using Swing 1.1.1

      If you call removeEditor() on JTable it stops editing as one
      would expect. However this method also requests focus for the table
      regardless of whether the editor component actually had focus.

      Relevant bit of code is (JTable 1.120):

          public void removeEditor() {
              TableCellEditor editor = getCellEditor();
              if(editor != null) {
                  editor.removeCellEditorListener(this);

      ****
                  requestFocus(); <---- Don't think this is right
      ****
                  remove(editorComp);

                  Rectangle cellRect = getCellRect(editingRow, editingColumn, false);

                  setCellEditor(null);
                  setEditingColumn(-1);
                  setEditingRow(-1);
                  editorComp = null;

                  repaint(cellRect);
              }
      (Review ID: 97284)
      ======================================================================

            Assignee:
            Philip Milne (Inactive)
            Reporter:
            Carlos Lucasius (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: