Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-03-2008, 09:05 AM
Member
 
Join Date: Jul 2008
Posts: 1
shyam is on a distinguished road
jframe.invokeAndWait() when called through invokeAndWait() does not successfully
My application had lots of EDT violations so to overcome this, I extended all the Swing components and in the overridden methods I checked that if the method had not been called through EDT thread then I created an EDT thread and called the method in the super class in that EDT thread. I took care to call the super class get methods through invokeAndWait() and set methods through invokeLater(). Also I took care to atleast initialise my components in EDT threads as I couldn't override the constructors because in constuctors super() should be the first executabe line of code and due to this it was not possible to write code for a separate Runnable entity. When I run my application I find that JFrame.getIgnoreRepaint() is called(I didn't call it explicitly but it was internally called) get struck and my application do not paint properly. I did some debugging and it seems to me that the EDT thread is actually not getting executed and the same time it doesn't send any notification also due to which the wait() method is never interrupted and the application just hangs. Anyway the problem is not much clear to me. So can anyone throw light on this? Also I wud like to know that is it alright to call methods like getIgnoreRepaint() which are actually called internally thorugh invokeAndWait?

Thread [AWT-Windows] (Suspended)
Object.wait(long) line: not available [native method]
EventQueue$1AWTInvocationLock(Object).wait() line: 474
EventQueue.invokeAndWait(Runnable) line: 846
SwingUtilities.invokeAndWait(Runnable) line: 1257
EMFrame.threadRuuner(Runnable) line: 6835
EMFrame.getIgnoreRepaint() line: 380
WFramePeer(WComponentPeer).handleExpose(int, int, int, int) line: 590
WToolkit.eventLoop() line: not available [native method]
WToolkit.run() line: 269
Thread.run() line: 595
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
jframe amith AWT / Swing 1 05-15-2008 11:03 AM
how to use JFrame in JSP ?? priyanka sharma JavaServer Pages (JSP) and JSTL 6 04-27-2008 08:08 AM
JFrame problem vassil_zorev AWT / Swing 1 01-25-2008 03:53 AM
JFrame problem saytri New To Java 6 01-11-2008 06:12 PM
Help with JFrame Albert AWT / Swing 2 07-04-2007 05:44 AM


All times are GMT +3. The time now is 01:09 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org