I'm looking for opinions regarding the different approaches I explain below. Technical opinions are welcome but i'm particuarly looking for HCI opinions.
I have a JTable which displays information from an ArrayList of Objects.
I need to have a few options which edit the contents of these table, remove row, add row, modify row.
I have been experimenting with a few options and have narrowed it down to the following:
Popup Menu with remove/modify options, activated by right clicking on the table and the "highlighted" row will be the row altered. Add row would probably need to be implemented outside of the popup menu.
Three buttons below table, whichever row is selected when the remove/modify button is clicked is altered.
Buttons appear within the table rows, a new column is added which holds buttons. A little repetitive though if a large number of rows exists.
I would also vote for option B. As a bonus it would allow for multiple row removal in a single action, if you decided to allow that.
 I was just looking at add/remove, for modify why not just let the rows be editable and have an update button. This would allow for multiple row updates also. [ April 21, 2005: Message edited by: Steven Bell ]
Joined: Apr 21, 2005
Of course, it also depends on how often the user will carry out each action. For example, if they are likely to be removing rows very often, they are going to get very annoyed with:
1. click on row 2. Move mouse to bottom of screen 3. Click Remove 4. Move mouse back up to next row
But if they only remove rows once in a while then I think that would be acceptable.
Joined: Nov 11, 2004
I've been thinking about these approaches and wonder if the following would be the best solution...
The concept is based around option A above.
User clicks a row with the left mouse button to select the row (right mouse button doesn't select in tables, if you know if this can be altered please say). When the right mouse button is clicked the drop down list is as follows.. - Add - Remove - Modify
-Add opens a dialog box accepting the neccessary values, when ok is selected the new row is placed at the bottom of the table. -Remove displays a confirmation dialog then deletes the selected row if yes selected. -Modify opens a dialog asking for the new values for the selected row then updates object.
I don't think its ideal, but its fairly neat and tidy. Would it be worthwhile combining this with a button below the table which is used to update any changed rows.
Does anyone know if its possible for the RMB to select a row before opening the popup menu?
Added: This is a university project and is aimed as a demonstration of ability not to be used as a long term system.
Thank-you for your responses. [ April 21, 2005: Message edited by: David Dickinson ]
Joined: Apr 21, 2005
The only thing about that which would concern me: if you are entering a lot of data, you want to keep your hands on the keyboard. Having extra dialogs etc come up make you reach for the mouse and break your flow of work. Keyboard shortcuts (as mentioned by an earlier poster) should definitely be implemented in this case IMHO.