Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JTextField hangs and freezes program when using active rendering.



Thank you all for the suggestions.

In the end, It seems that putting the paintComponents in an invokeAndWait solved the issue. I tried adding a sleep after each paint, and a Thread.yeild(), that didn't help.

I also set all the components to ignore repaints, that helped a lot, but the text field would still freeze after some usage.

Adding this bit around the paint components made it work without either of the first two.
[code]
SwingUtilities.invokeAndWait(new Runnable() {
        public void run() {
            //logger.info("painting - elapsed time: " + elapsedTime);
            paintComponents(graphics);
        }
});
[/code]

However, this accompanied with setting the ignore repaints to true on all the components (including the content pane, and layered pane of the application frame) sped things up some.

Thanks again for all the help,
Eric

--
Learn from the past. Live in the present. Plan for the future.
11101000
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: JTextField hangs and freezes program when using active rendering. (From: "Eric Berry" <email@hidden>)
 >Re: JTextField hangs and freezes program when using active rendering. (From: "Eric Berry" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.