|
-
February 23rd, 2000, 03:28 AM
#1
How can I set focus to a particular table's cell
How can I set focus to a particular table's cell?
Thanks
-
February 23rd, 2000, 05:39 AM
#2
Re: How can I set focus to a particular table's cell
Hello,
you can select a cell in a table, and you can edit that cell. If you edit that cell, the celleditor of it get the focus and the table lost the focus. If you just select the cell, the table has the focus but the cell is selected.
You can select cells with the following methods:
setColumnselectionInterval(int, int)
setRowSelectionInterval(int, int)
and you can edit a cell by the following method:
editCellAt(int iColumn, int iRow)
Greetings
Ting.
-
February 24th, 2000, 01:46 AM
#3
Re: How can I set focus to a particular table's cell
Thanks for your reply! It works.
How can I cancel the focus of a particular cell?
Suppose that when user click a particular cell, I will show
a dialog.
After that, I want to cancel the focus of this cell.
How can I achieve it?
-
February 24th, 2000, 06:53 AM
#4
Re: How can I set focus to a particular table's cell
Hello,
to cancel the selection, use the methode
JTable.clearSelection();
To cancel the editing, use the methode
JTable.getCellEditor().stopCellEditing();
Greetings.
Ting.
-
February 25th, 2000, 07:13 AM
#5
Re: How can I set focus to a particular table's cell
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|