if the socket is registered with the Selector in WRITE mode, then the Selector.select() call will always return immediately, because it has at least one socket which is ready to be written to.

Now my problem, since calling register() function in a thread other than the one that calls select() will cause blocking problem. How would I write data to the channel if I can't register the channel to write state?

Hum.. Thanks for the tip but that's not exactly what I want. Because all the stuff in the drawing would have different coordinations and I only want to display a perticular view. Also there are many objects so I don't want to translate all their coordinates first before drawing it.

Hi I'm trying to draw something out of viewing area, but somehow things outside of Canvas bound will not be drawed. Is there anyway I can still draw those? I need to copy the image there and be able to move it around... Any ideas?

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org