Click to See Complete Forum and Search --> : giving an applet a boundary


flossie
July 31st, 2000, 03:20 PM
I have an applet that allows you to enter a character and using the arrow keys to move it around...how can i put a boundary around the applet so it can't disappear from view?i have managed to put in a boundary that stops it disappearing off the top and off the left but i cant seem to figure out how to stop is from disappearing off to the right or down...any help would be much appreciated..thankyou in advance!!

Norm
August 4th, 2000, 12:06 PM
What code is moving the character around? It needs to check the size of the display area and NOT allow the character to be moved out of it. How did you stop it from leaving at the top and left?
See the getSize() and getInsets() methods.