Graphics.drawImage() question
Say that I override the paint method in a class that extends JPanel, like this:
Code:
public void paint(Graphics g) {
super.paint(g);
g.drawImage(anImage, 0, 0, null);
}
Will the drawImage method draw the entire image even if it is outside of the frame bounds? Or does it automatically draw the parts of the image that actually are inside the frame? When creating GUI applications I usually create a JFrame with a JPanel of the same size in it. I'm asking because I'm working on something that draws a huge image which moves around and I would like to know if it efficient or not.
If this is unclear, I'm sorry, but please to try answer the question if you think you know the answer. I'm not really sure how to ask.