Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #273
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: How Do I Make My Appl |
| Message-ID | <1164897371.451805.7030@16g2000cwy.googlegroups.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <1164832296.233748.5580@j44g2000cwa.googlegroups.com><steve |
| Date | 2011-04-27 15:26 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui
Jason Cavett wrote:
> On Nov 29, 4:33 pm, "Steve W. Jackson" <stevewjack...@knology.net>
> wrote:
> > In article <1164832296.233748.5...@j44g2000cwa.googlegroups.com>,
> > "Jason Cavett" <jason.cav...@gmail.com> wrote:
...
> > > I'm currently designign a GUI and, while it's going pretty well, I've
> > > noticed when I do something like open an document using the GUI, the
> > > drop down menu (File > Open) that I've created doesn't immediately
> > > disappear.
....
> > If you do everything that File>Open implies inside the actionPerformed
> > method of an ActionListener, which executes on the Event Dispatch Thread
> > (EDT),
.....
> > One step I've taken is to have that actionPerformed method create a
> > separate thread to do its work.
...
> So, I attempted to create a thread in my actionPerformed with the
> following code:
>
> Thread appThread = new Thread() {
> public void run() {
> try {
> model.openProject();
....
> However, the menu still seems a little sluggish. Am I approaching this
> the right way? (I was never very strong with Threads, so things get a
> little fuzzy here for me.)
A simple test for whether the problem lies deeper is
to do absolutely nothing in the action performed, just
to check that the menu disappears quickly when
there is no process behind it..
..as an aside, please replace tabs with 2 or 3 spaces
before posting code to usenet, as some news clients,
and web based interfaces to usenet, expand tabs to
ridiculous widths.
Andrew T.
---
* 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 | Find similar
How Do I Make My Applicat "Jason Cavett" <jason.cavett@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: How Do I Make My Appl "david" <david@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: How Do I Make My Appl "Steve W. Jackson" <steve.w..jackson@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: How Do I Make My Appl "Jason Cavett" <jason.cavett@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: How Do I Make My Appl "Steve W. Jackson" <steve.w..jackson@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: How Do I Make My Appl "Jason Cavett" <jason.cavett@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: How Do I Make My Appl "steve" <steve@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: How Do I Make My Appl "Timasmith" <timasmith@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: How Do I Make My Appl "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
csiph-web