Article View: borland.public.jbuilder.java.swing
Article #9848Re: how 2 end editition in jtable
From: Ernesto Bascón
Date: Mon, 10 Jan 2000 00:00
Date: Mon, 10 Jan 2000 00:00
38 lines
1518 bytes
1518 bytes
Hi:
When you press the OK Button, the edition is finished (because the table
losses focus).
if you explicitly want to end the edition of a JTable, you must write
the following
code:
yourTable.getCellEditor().stopCellEditing();
Now, if you want to know when the edition of a cell has finished, you
must add
an CellEditorListener to the cell editor.
yourTable.getDefaultEditor(Object.class).addCellEditorListener(new
CellEditorListener ()
{
public void editingStopped(ChangeEvent e)
{
//your code here
};
});
The event will be called when the edition of a cell has finished.
Omer Azhar Qureshi wrote:
>
> hi all,
>
> in JTable isEditing returns if the table is editing any cell, how to end
> this editition??? i.e. if we are editing a cell & press the OK button then
> how to end the editition before performing the okay task???
>
> thanx in advance
> Oaq
Technical Details
Message-ID:
<387A68BB.32375A2B@linux.ucbcba.edu.bo>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<851ldg$pp312@bornews.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,b6317386e470914c X-Google-Attributes: gid111d45,public From: Ernesto Bascón <bascone@linux.ucbcba.edu.bo> Subject: Re: how 2 end editition in jtable Date: 2000/01/10 Message-ID: <387A68BB.32375A2B@linux.ucbcba.edu.bo> X-Deja-AN: 570917499 Content-Transfer-Encoding: 7bit References: <851ldg$pp312@bornews.borland.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: UCB Mime-Version: 1.0 Reply-To: bascone@linux.ucbcba.edu.bo Newsgroups: borland.public.jbuilder.java.swing