Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #3113
| From | "Stanimir Stamenkov" <stanimir.stamenkov@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Opposite of SwingUtil |
| Message-ID | <foc06g$2mk$1@registered.motzarella.org> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <47a8db72$0$3057$7836cce5@newsrazor.net> |
| Date | 2011-04-27 15:43 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui
Tue, 05 Feb 2008 13:56:55 -0800, /Daniel Pitts/:
> (BTW, you should
> use EventQueue.invokeLater, not SwingUtilities)
"Transcript of Ask the Experts session on Swing"
<http://java.sun.com/developer/community/askxprt/2006/jl1016.html>:
> *M Dunn*: Starting a Swing app. I've seen a couple of recommended
> ways:
>
> public static void main(String[] args)
> {
> 1) SwingUtilities.invokeLater(...
> 2) EventQueue.invokeLater(...
> }
>
> Which is the better way to start, or perhaps another way.
>
> *Scott Violet*: Here's the implementation for
> SwingUtilities.invokeLater:
>
> public static void invokeLater(Runnable doRun) {
> EventQueue.invokeLater(doRun);
> }
>
> Looks familiar, eh? So, if you use EQ.invokeLater you have one
> method call on the stack. Some would argue that using EQ directly
> avoids the additional classload of SwingUtilities. But internally
> Swing uses SwingUtilities, so that argument doesn't really hold. So,
> it comes do to the additional method on the stack. Does that matter
> for application startup? I hardly think so. In the end I think it
> comes down to what you prefer. After all these years my fingers
> can't type anything but SwingUtilities. :)
--
Stanimir
---
* 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 | Unroll thread
Opposite of SwingUtilitie "larkmore" <larkmore@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
Re: Opposite of SwingUtil "Rogan Dawes" <rogan.dawes@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
Re: Opposite of SwingUtil "larkmore" <larkmore@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
Re: Opposite of SwingUtil "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
Re: Opposite of SwingUtil "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
Re: Opposite of SwingUtil "Stanimir Stamenkov" <stanimir.stamenkov@THRWHITE.remove-dii-this> - 2011-04-27 15:43 +0000
Re: Opposite of SwingUtil "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> - 2011-04-27 15:43 +0000
Re: Opposite of SwingUtil "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:43 +0000
csiph-web