Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

How should I check this boolean issue  RSS feed

 
Greenhorn
Posts: 16
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my application a problem comes up with checking a Boolean here is the situation:
-  A class that uses the Boolean that needs to run another piece of code if it comes out true but the class is instantiated once and could possibly need a code rewrite to call easily call methods to that class. If necessary ill take that route
-  Attempted to turn it into some sort of while check/loop until the class finishes all the code necessary. The while loop seems to stop graphics even with graphics repaints/updates in the waiting loop which I assumes fails because the repaints possibly goes into another thread that cannot run with the while loop in the main thread taking up to much.
- My last option is to use a Change Listeners but I'm unsure if it will work with a Boolean.

Could a change listener work with a Boolean, or should I just work on another method? Thanks.
 
Greenhorn
Posts: 4
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, maybe you can show some code?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!