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


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

Re: Opposite of SwingUtil

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail
From "Stanimir Stamenkov" <stanimir.stamenkov@THRWHITE.remove-dii-this>
Subject Re: Opposite of SwingUtil
Message-ID <foc06g$2mk$1@registered.motzarella.org> (permalink)
X-Comment-To comp.lang.java.gui
Newsgroups comp.lang.java.gui
In-Reply-To <47a8db72$0$3057$7836cce5@newsrazor.net>
References <47a8db72$0$3057$7836cce5@newsrazor.net>
Content-Type text/plain; charset=IBM437
Content-Transfer-Encoding 8bit
X-Gateway time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92]
Lines 43
Date Wed, 27 Apr 2011 15:43:00 GMT
NNTP-Posting-Host 96.60.20.240
X-Complaints-To news@tds.net
X-Trace newsreading01.news.tds.net 1303918980 96.60.20.240 (Wed, 27 Apr 2011 10:43:00 CDT)
NNTP-Posting-Date Wed, 27 Apr 2011 10:43:00 CDT
Organization TDS.net
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.gui:3113

Show key headers only | View raw


  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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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