Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

UI flickrs continously jdk1.7 EventdispatchThread's pumpEventsForFilter goes to infinite while loop  RSS feed

 
hima reddy
Greenhorn
Posts: 9
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am migrating a project from Java 1.3 to Java 1.7 update 25 and there is one search button functionality in which search is performed correctly but the UI flickers continuously because EventdispatchThread's pumpEventsForFilter goes to infinite while loop.

This same code works correctly in java 1.3.

Below is the part of the code related to searchbutton. Can you please suggest regarding this because the issue is within java api and not sure how to solve this.


SearchButton.java:

-----
EventDispatchThread:
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In future while posting code, please UseCodeTags. I have added them this time for you. As you can see they make the code much more easier to read and understand.

The (unformatted) code you posted doesnt help us identify the problem. Please post your SSCCE (and formatted) code
 
Sam Gooding
Ranch Hand
Posts: 35
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What he said. Also , if it helps motivate you to create a SCCEE- which is sometimes a bit of a labor since the troublesome code is not likely to have come from an SCCEE- consider that by doing so you potentially benefit by accidentally solving your own problem. For instance, in this exact case, you've made an assumption about where the problem lies- it's somewhere in the code you posted. But what if that assumption is false? What if the problem isn't there? What if it's something about how the code you posted interacts with code you didn't post? You'd actually discover that by creating an SCCEE and have it work as expected.

As it is, because too much of the scope of the entities you posted is just missing, it's impossible for this reader to troubleshoot your problem. If you can come back with an SCEEE, then people will gladly loook it over.

HTH!
 
Randall Twede
Ranch Hand
Posts: 4683
8
Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
while it is not impossible the problem is with the API it is extremely unlikely. one thing i notice is before the loop you set doDispatch = true, but inside your loop you never set it to false. so the only way the loop can end is if isInterrupted() becomes true or cond.evaluate() becomes false
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!