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


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

Re: JTable Tab Focus prob

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.alt.net!news-in-01.newsfeed.easynews.com!easynews.com!easynews!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail
From "Stefan Rybacki" <stefan.rybacki@THRWHITE.remove-dii-this>
Subject Re: JTable Tab Focus prob
Message-ID <48b53f86$1@news.uni-rostock.de> (permalink)
X-Comment-To comp.lang.java.gui
Newsgroups comp.lang.java.gui
In-Reply-To <95b90cf3-2531-4251-9913-efe9b71f09f6@r15g2000prd.googlegroups.com>
References <95b90cf3-2531-4251-9913-efe9b71f09f6@r15g2000prd.googlegroups.com>
Content-Type text/plain; charset=IBM437
Content-Transfer-Encoding 8bit
X-Gateway time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92]
Lines 38
Date Wed, 27 Apr 2011 15:48:42 GMT
NNTP-Posting-Host 96.60.20.240
X-Complaints-To news@tds.net
X-Trace newsreading01.news.tds.net 1303919322 96.60.20.240 (Wed, 27 Apr 2011 10:48:42 CDT)
NNTP-Posting-Date Wed, 27 Apr 2011 10:48:42 CDT
Organization TDS.net
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.gui:4103

Show key headers only | View raw


  To: comp.lang.java.gui
striderwho@hotmail.com schrieb:
> Hi there, I know this problem has propped up all over the place but
> the answers have not helped me to solve my problem entirely. I think
> this is because with each change of data in any cell in my table, the
> entire table needs to be reinitialised - that is, the data model is
> reloaded anew and the table revalidated.

How does your table model handle changes to it? Usually you don't need to reload 
and revalidate everything but only changed values. Use the tableChanged method 
in the TableModelListener to tell the listener exactly what has changed.

> 
> So, my table consists of multiple rows and columns, some editable and
> some not, and a few different CellEditors (JComboBoxes and
> JFormattedTextFields). In addition the table is part of a JPanel with
> another panel of JRadioButtons. I would like the "intuitive" (client's
> words, not mine) functionality to be able to Tab across cells and
> start typing to edit the fields, as well as to double-click on a cell
> to start editing.

The thing is your TAB KeyStroke only works as long as the actual table is in
focus. When you start editing the editing field (JTextField or whatever) is in
focus.

> 
 >...

Regards
Stefan
> 
> I hope you understood what I just typed. I'd be grateful for any help,
> it's driving me nuts.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

JTable Tab Focus problem "striderwho" <striderwho@THRWHITE.remove-dii-this> - 2011-04-27 15:48 +0000
  Re: JTable Tab Focus prob "Stefan Rybacki" <stefan.rybacki@THRWHITE.remove-dii-this> - 2011-04-27 15:48 +0000
    Re: JTable Tab Focus prob "striderwho" <striderwho@THRWHITE.remove-dii-this> - 2011-04-27 15:48 +0000

csiph-web