when i set some image on Jpanel n when i move that image it goes out of Jpanel when it drag to JPanel Boundaries !!

What to do ?? i want that in Jpanel not out of Jpanel!!

03-09-2012, 09:31 AM

JosAH

Re: To fix Boundary For Jpanel???

Why all the exclamation marks? Your image goes out of the JPanel boundaries because you didn't tell it to scale itself when needed; read the API documentation for the Graphics class to see how to scale an Image.