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


Groups > comp.lang.java.programmer > #37633

Re: How do you update the view space of a JTable?

Path csiph.com!feeder.erje.net!2.eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Daniele Futtorovic <da.futt.news@laposte.net>
Newsgroups comp.lang.java.programmer
Subject Re: How do you update the view space of a JTable?
Date Tue, 31 Oct 2017 23:33:46 +0100
Organization A noiseless patient Spider
Lines 19
Message-ID <otatqv$4l5$1@dont-email.me> (permalink)
References <8a75cc49-c369-41bb-8e5e-254977d4e410@googlegroups.com> <ot7kpq$koi$1@dont-email.me> <0a028d23-313f-4c8f-8516-80a5111e406a@googlegroups.com> <ot9i92$7eg$1@dont-email.me> <5037e6b0-3509-4ffd-a8f2-ad659c5b4d4b@googlegroups.com> <ot9ois$idb$1@dont-email.me> <66fc1800-d494-43a1-963d-a1a54a99f631@googlegroups.com> <ot9qht$3bf$1@dont-email.me> <28c95541-33f4-4502-af4e-31d82c672841@googlegroups.com> <otap2d$uss$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
Injection-Date Tue, 31 Oct 2017 22:35:11 -0000 (UTC)
Injection-Info reader02.eternal-september.org; posting-host="01c74b97aecf04dfd64b23610c19896c"; logging-data="4773"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ESosPQWZtQbwyAmGUvkLJ"
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
In-Reply-To <otap2d$uss$1@dont-email.me>
X-Antivirus-Status Clean
Content-Language en-GB
X-Antivirus AVG (VPS 171031-4, 10/31/2017), Outbound message
Cancel-Lock sha1:vwTPJkJfv+5hBjSA3CSPXz0Jt3Q=
Xref csiph.com comp.lang.java.programmer:37633

Show key headers only | View raw


On 2017-10-31 22:13, Eric Sosman wrote:
>     - Venial: Various constructors leak the `this' reference before
> `this' is fully constructed.  The transgression would ordinarily be
> worse than venial, but adding event listeners "should probably be"
> safe since they're unlikely to be called until a good deal later.
> IMHO this is an infelicity in the architecture of Swing/AWT: You
> would *like* a constructor to deliver a fully-functional ready-to-
> rumble instance of a JFrame or whatever, but if you're really not
> supposed to register event listeners in a constructor ...  

Very much seconded.

I don't do much Swing any more these days, but what I used to do when I
did, was to move a lot of initialisation and registration to the
Component#addNotify (and the cleanup in Component#removeNotify) method.
It seemed to work fairly well.

-- 
DF.

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How do you update the view space of a JTable? Eric Douglas <e.d.programmer@gmail.com> - 2017-10-17 08:47 -0700
  Re: How do you update the view space of a JTable? Eric Douglas <e.d.programmer@gmail.com> - 2017-10-18 06:11 -0700
  Re: How do you update the view space of a JTable? Daniele Futtorovic <da.futt.news@laposte.net> - 2017-10-30 17:41 +0100
    Re: How do you update the view space of a JTable? Eric Douglas <e.d.programmer@gmail.com> - 2017-10-30 10:29 -0700
      Re: How do you update the view space of a JTable? Daniele Futtorovic <da.futt.news@laposte.net> - 2017-10-31 11:10 +0100
        Re: How do you update the view space of a JTable? Eric Douglas <e.d.programmer@gmail.com> - 2017-10-31 04:46 -0700
          Re: How do you update the view space of a JTable? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-10-31 07:59 -0400
            Re: How do you update the view space of a JTable? Eric Douglas <e.d.programmer@gmail.com> - 2017-10-31 05:21 -0700
              Re: How do you update the view space of a JTable? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-10-31 08:32 -0400
                Re: How do you update the view space of a JTable? Eric Douglas <e.d.programmer@gmail.com> - 2017-10-31 06:13 -0700
                Re: How do you update the view space of a JTable? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-10-31 17:13 -0400
                Re: How do you update the view space of a JTable? Daniele Futtorovic <da.futt.news@laposte.net> - 2017-10-31 23:33 +0100
                Re: How do you update the view space of a JTable? Eric Douglas <e.d.programmer@gmail.com> - 2017-11-01 06:29 -0700
                Re: How do you update the view space of a JTable? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-11-01 10:37 -0400
                Re: How do you update the view space of a JTable? Eric Douglas <e.d.programmer@gmail.com> - 2017-11-01 08:37 -0700
                Re: How do you update the view space of a JTable? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-11-01 13:20 -0400

csiph-web