2

I want to ask some questions regarding editing cell in a table.

Currently my practices of doing cell editing in a table is by double-clicking the cell to make the cell editable for text input. For the single-clicking, it will select the row instead. It just like Excel behaviour of cell editing. What I see in some of JIDE demo , some of the table can be editable using single-click such as "EditableTableHeaderDemo" and some of it can be editable using double-clicking such as JideTableDemo.

What I want to know here is the best practices of cell editing in a table whether it is single-click or double-click? Is there any issue if we use double-click to edit the table compared to the single-click to edit the table? In terms of user friendliness,usability and human computer interaction, which one is better?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
blurbs
  • 23
  • 3
  • 3
    This is subjective, over the years, I've heard a lot of users say "like Excel" and when you implement as such, they complain because entry is to difficult, so we end up allowing the table to be in "continuous" edit mode, so any event will allow a cell to become editable. There are pros and cons to both and a lot will come down the job that the table is performing. A more important consideration would be establishing consistency so it was easy for the user to determine the edit mode - IHMO – MadProgrammer Nov 26 '12 at 03:23
  • in terms of my table, I implements combobox in the table column, so the combobox is editable when single-click then the list will display. another cell in the table is using common textfield which will be editable when double-clicking it.Currently, it is not consistent in term of user to determine the edit mode. Logically, it does not have any performance issue regarding the double-click and single-click behaviour, am I right? – blurbs Nov 26 '12 at 03:57

1 Answers1

3

Many users prefer a key binding. F2 is a common (but not universal) default; Enter also has some appeal. Also consider making the choice part of your java.util.Preferences, mentioned here.

table.getInputMap().put(
    KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "startEditing");
Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045