🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #1294

Re: Detect Cell Editing in JTable

#1294
From: Steve
Date: Sun, 28 Dec 2003 17:57
22 lines
2086 bytes
"Tor Iver Wilhelmsen (TeamB)" <tor.wilhelmsen@ergo.no> wrote in message
news:u65g89e2x.fsf@ergo.no...
> "Steve" <pearsons_11113@mindspring.com> writes:
>
> > Correct me if I'm wrong, but that's actually before editing begins, yes?
> > What I want to do is call a selectAll() on the textfield so that it
behaves
> > like the typical Windows data entry application (i.e. selects all the
text
> > so you can overwrite quickly without extraneous actions). Thx.
>
> In that case, make a subclass of DefaultCellEditor which casts to
> JTextField and calls selectAll() when the component is requested.

That worked. Thx.

Does seem a little awkward that you have to do two totally different
modifications based on the particular mode of entry into editing the cell,
especially for something so simple. Also seems like total overkill to have
to subclass just to get a slight change in behavior that really ought to be
configurable. Guess it's the "easy things hard to do" price to pay for the
"hard things possible".
Technical Details
Message-ID: <3fef1984@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news-out1.nntp.be!propagator2-sterling!in.nntp.be!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!newsgroups.borland.com!not-for-mail
References: <3fe6413e$1@newsgroups.borland.com> <uwu8p9rwr.fsf@ergo.no> <3fe72213$1@newsgroups.borland.com> <u65g89e2x.fsf@ergo.no>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,a6b8964b405ddc75
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2003-12-28 09:59:17 PST
From: "Steve" <pearsons_11113@mindspring.com>
Newsgroups: borland.public.jbuilder.java.swing
References: <3fe6413e$1@newsgroups.borland.com> <uwu8p9rwr.fsf@ergo.no> <3fe72213$1@newsgroups.borland.com> <u65g89e2x.fsf@ergo.no>
Subject: Re: Detect Cell Editing in JTable
Date: Sun, 28 Dec 2003 09:57:22 -0800
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 199.174.199.173
Message-ID: <3fef1984@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1072634244 199.174.199.173 (28 Dec 2003 09:57:24 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news-out1.nntp.be!propagator2-sterling!in.nntp.be!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!newsgroups.borland.com!not-for-mail