Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #4388
| From | "Stefan Rybacki" <stefan.rybacki@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Sharing ListSelection |
| Message-ID | <48fa372e$1@news.uni-rostock.de> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <maGdnZgXIpQvs2fVnZ2dnUVZ_hCdnZ2d@comcast.com> |
| Date | 2011-04-27 15:50 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui
Lew schrieb:
> John B. Matthews wrote:
>> perhaps something like this might work:
>
> A couple of things concern me about this code.
>
You are right but keep in mind that this was hacked together very quick
to show the behaviour I was talking about.
>...
>> for (int i = 0; i < 10; i++)
>> model.addElement(String.format("Item number %d", i));
>>
>> SwingUtilities.invokeLater(new Runnable() {
>
> And here you finally push code onto the EDT, but the construction was not.
I'm not aware that the construction actually needs to be pushed to the
EDT. Why should I? I mean what if the construction takes a while for
whatever reasons the EDT is blocked? Do you have any resource stating
that also the construction should be pushed to the EDT?
>
>> //@Override
>> public void run() {
>> frame.setSize(500, 500);
>> frame.setVisible(true);
>
> No call to 'pack()'.
Sometimes pack() actually results in weird behaviour. I don't have an
example now but remember I had unexpected behaviour in some cases.
>
>> }
>>
>> });
>> }
>> }
>> </code>
>
Stefan
---
* 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 | Next — Previous in thread | Next in thread | Find similar
Sharing ListSelectionMode "Stefan Rybacki" <stefan.rybacki@THRWHITE.remove-dii-this> - 2011-04-27 15:50 +0000
Re: Sharing ListSelection "Sabine Dinis Blochberger" <sabine.dinis.blochberger@THRWHITE.remove-dii-this> - 2011-04-27 15:50 +0000
Re: Sharing ListSelection "Stefan Rybacki" <stefan.rybacki@THRWHITE.remove-dii-this> - 2011-04-27 15:50 +0000
Re: Sharing ListSelection "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:50 +0000
Re: Sharing ListSelection "Stefan Rybacki" <stefan.rybacki@THRWHITE.remove-dii-this> - 2011-04-27 15:50 +0000
Re: Sharing ListSelection "John B. Matthews" <john.b..matthews@THRWHITE.remove-dii-this> - 2011-04-27 15:50 +0000
Re: Sharing ListSelection "Stefan Rybacki" <stefan.rybacki@THRWHITE.remove-dii-this> - 2011-04-27 15:50 +0000
Re: Sharing ListSelection "John B. Matthews" <john.b..matthews@THRWHITE.remove-dii-this> - 2011-04-27 15:50 +0000
Re: Sharing ListSelection "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:50 +0000
Re: Sharing ListSelection "Stefan Rybacki" <stefan.rybacki@THRWHITE.remove-dii-this> - 2011-04-27 15:50 +0000
Re: Sharing ListSelection "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:50 +0000
Re: Sharing ListSelection "Stefan Rybacki" <stefan.rybacki@THRWHITE.remove-dii-this> - 2011-04-27 15:50 +0000
Re: Sharing ListSelection "John B. Matthews" <john.b..matthews@THRWHITE.remove-dii-this> - 2011-04-27 15:50 +0000
Re: Sharing ListSelection "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:50 +0000
Re: Sharing ListSelection "Stefan Rybacki" <stefan.rybacki@THRWHITE.remove-dii-this> - 2011-04-27 15:50 +0000
csiph-web