I have a problem with using JTable, editing a cell in a row and then
expecting that edited cell data to automatically show up via
tblDisplay.getValueAt(row, i); Just to be clear, tblDisplay is of class
JTable.
The problem shows up when you edit a cell but don't tab away from the cell.
It's like the edited cell data doesn't "stick". What can I do to handle
this? Anything? I have an issue where the last cell in a selected row is
edited and then the user selects the "Update" button to save the changes.
The Update button is coded to grab data from the selected row and save the
data. The problem is the last cell is never seen, unless the user tabs
away. But tabbing away means selecting the next row. So now the user is on
the wrong row, so they must tab back. Aaaarrrgggh!!!
I would appreciate some help,
-Fred
|
|
0
|
|
|
|
Reply
|
Fred
|
9/16/2004 1:57:30 AM |
|
Fred wrote:
> I have a problem with using JTable, editing a cell in a row and then
> expecting that edited cell data to automatically show up via
> tblDisplay.getValueAt(row, i); Just to be clear, tblDisplay is of class
> JTable.
>
> The problem shows up when you edit a cell but don't tab away from the cell.
> It's like the edited cell data doesn't "stick". What can I do to handle
> this? Anything? I have an issue where the last cell in a selected row is
> edited and then the user selects the "Update" button to save the changes.
> The Update button is coded to grab data from the selected row and save the
> data. The problem is the last cell is never seen, unless the user tabs
> away. But tabbing away means selecting the next row. So now the user is on
> the wrong row, so they must tab back. Aaaarrrgggh!!!
>
This is a rather complicated problem - I suggest you refer to an
excellent discussion on this at :
http://www.mycgiserver.com/~Kleopatra/swing/swingentry.html
BK
|
|
0
|
|
|
|
Reply
|
Babu
|
9/16/2004 4:14:58 AM
|
|
Thanks BK. That is exactly what I'm seeing. I will try the new table
property and see how it goes.
This isn't the first time Jeanette has saved the day. Props to Jeanette!
-Fred
"Babu Kalakrishnan" <k.a.l.a@sankya.com> wrote in message
news:2qsifcF11ictkU1@uni-berlin.de...
> Fred wrote:
> > I have a problem with using JTable, editing a cell in a row and then
> > expecting that edited cell data to automatically show up via
> > tblDisplay.getValueAt(row, i); Just to be clear, tblDisplay is of class
> > JTable.
> >
> > The problem shows up when you edit a cell but don't tab away from the
cell.
> > It's like the edited cell data doesn't "stick". What can I do to handle
> > this? Anything? I have an issue where the last cell in a selected row
is
> > edited and then the user selects the "Update" button to save the
changes.
> > The Update button is coded to grab data from the selected row and save
the
> > data. The problem is the last cell is never seen, unless the user tabs
> > away. But tabbing away means selecting the next row. So now the user is
on
> > the wrong row, so they must tab back. Aaaarrrgggh!!!
> >
>
> This is a rather complicated problem - I suggest you refer to an
> excellent discussion on this at :
>
> http://www.mycgiserver.com/~Kleopatra/swing/swingentry.html
>
> BK
>
|
|
0
|
|
|
|
Reply
|
Fred
|
9/16/2004 5:46:45 AM
|
|
|
2 Replies
399 Views
(page loaded in 0.037 seconds)
Similiar Articles: JTable, edit a cell, but changed value not seen - comp.lang.java ...I have a problem with using JTable, editing a cell in a row and then expecting that edited cell data to automatically show up via tblDisplay.getValueA... JTable Edit and Validation - comp.lang.java.guiJTable, edit a cell, but changed value not seen - comp.lang.java ... I have a problem with using JTable, editing a cell in a row and then expecting that edited cell data ... JTable Row Height Problem - comp.lang.java.guiJTable, edit a cell, but changed value not seen - comp.lang.java ... JTable Row Height Problem - comp.lang.java.gui... increase or the look and feel is changed ... java ... jtextfield in jtable - comp.lang.java.guiJTable, edit a cell, but changed value not seen - comp.lang.java ... how to put JTextfield and JButton in a cell of JTable - comp.lang ..... JTextfield and JButton in a ... changing font for particular cell in JTable - comp.lang.java.help ...JTable, edit a cell, but changed value not seen - comp.lang.java ... Sorting JTable with fixed column - comp.lang.java.gui changing font for particular cell in JTable ... JTable with row selection, but no cell selection - comp.lang.java ...JTable, edit a cell, but changed value not seen - comp.lang.java ... I have a problem with using JTable, editing a cell in a row and then expecting that ... how to put JTextfield and JButton in a cell of JTable - comp.lang ...JTable, edit a cell, but changed value not seen - comp.lang.java ... how to put JTextfield and JButton in a cell of JTable - comp.lang ..... JTextfield and JButton in a ... JTable and Enter key - comp.lang.java.guiJTable, edit a cell, but changed value not seen - comp.lang.java ... JTable and Enter key - comp.lang.java.gui... cell (1,1) 3. press some keys (like 123) to change the ... Cell focus in JTable - avoid focus on non-editable cells? - comp ...JTable, edit a cell, but changed value not seen - comp.lang.java ... Can't the original matrix itself be seen as a list ... Cell focus in JTable - avoid focus on non ... Selecting a row in a JTable - comp.lang.java.guiJTable, edit a cell, but changed value not seen - comp.lang.java ... I have a problem with using JTable, editing a cell in a row and then expecting that ... JTable, edit a cell, but changed value not seen - comp.lang.java ...I have a problem with using JTable, editing a cell in a row and then expecting that edited cell data to automatically show up via tblDisplay.getValueA... JTable Edit and Validation - comp.lang.java.gui | Computer GroupJTable, edit a cell, but changed value not seen - comp.lang.java ... I have a problem with using JTable, editing a cell in a row and then expecting that edited cell data ... 7/29/2012 5:17:34 AM
|