Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #5337

JTable CellRendererPane placement

X-Received by 10.224.36.66 with SMTP id s2mr8182979qad.6.1368045259507; Wed, 08 May 2013 13:34:19 -0700 (PDT)
X-Received by 10.50.109.228 with SMTP id hv4mr1439512igb.2.1368045259434; Wed, 08 May 2013 13:34:19 -0700 (PDT)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!m7no3671980qam.0!news-out.google.com!y6ni20871qax.0!nntp.google.com!m7no3671979qam.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.java.gui
Date Wed, 8 May 2013 13:34:19 -0700 (PDT)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=130.76.32.52; posting-account=_7xgmwoAAADi7iXKBO-oX5zbCfSzsCV0
NNTP-Posting-Host 130.76.32.52
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <4feceb84-2eac-4dae-97ae-c2a1decbddae@googlegroups.com> (permalink)
Subject JTable CellRendererPane placement
From FredK <fred.l.kleinschmidt@gmail.com>
Injection-Date Wed, 08 May 2013 20:34:19 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com comp.lang.java.gui:5337

Show key headers only | View raw


I have a JTable with two columns and a JTableHeader.
The left column contains strings, and the right column contains JTextFields.
Clicking on a header sorts the rows.

If I click in one of the text fields to begin editing it ( say, for
instance, in row 7), and then click in the header to sort the table, 
the CellRendererPane (and the CellEditor) remain over the original position
(row 7), even though that field is now in row 2. When I click in the editor
it *LOOKS* like I am editing what is now in line 7, but in fact I am still
editing what is now in row 2. 

If I click over any other row, or resize the table, everything gets 
updated and the editor moves to the proper position.

After sorting, how can I ensure that the editor moves be over the
new position?
-- 
Fred K

Back to comp.lang.java.gui | Previous | NextNext in thread | Find similar


Thread

JTable CellRendererPane placement FredK <fred.l.kleinschmidt@gmail.com> - 2013-05-08 13:34 -0700
  Re: JTable CellRendererPane placement Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2013-05-09 00:59 +0200
    Re: JTable CellRendererPane placement "John B. Matthews" <nospam@nospam.invalid> - 2013-05-08 20:15 -0400

csiph-web