void () { int column = myTable.getEditingColumn(); int row = myTable.getEditingRow(); Component editor = myTable.getEditorComponent(); if (column == -1 || row == -1 || editor == null) return; Rectangle cellRect = myTable.getCellRect(row, column, false); Rectangle visibleRect = myTable.getVisibleRect(); if (visibleRect.intersects(cellRect)) return; Rectangle editorBounds = editor.getBounds(); if (!visibleRect.intersects(editorBounds)) return; editorBounds.x = cellRect.x; editorBounds.y = cellRect.y; editor.setBounds(editorBounds); }