Results 1 to 1 of 1
Thread: Graphics.drawImage() question
- 03-28-2012, 10:52 PM #1
Member
- Join Date
- Mar 2012
- Posts
- 2
- Rep Power
- 0
Graphics.drawImage() question
Say that I override the paint method in a class that extends JPanel, like this:
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.Java Code:public void paint(Graphics g) { super.paint(g); g.drawImage(anImage, 0, 0, null); }
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.Last edited by sakratt; 03-29-2012 at 08:56 AM.
Similar Threads
-
NullPointerException on Graphics.drawImage
By Jaeela in forum New To JavaReplies: 5Last Post: 10-05-2011, 02:36 AM -
Graphics question
By Guy in forum New To JavaReplies: 6Last Post: 07-19-2011, 07:23 AM -
Question on Graphics/JFrame/KeyEvents
By loopsnhoops in forum New To JavaReplies: 4Last Post: 02-10-2011, 11:22 PM -
Question on Graphics etc...
By loopsnhoops in forum Advanced JavaReplies: 2Last Post: 02-10-2011, 11:10 PM -
java graphics question
By bobCallahan24 in forum AWT / SwingReplies: 1Last Post: 01-15-2010, 06:04 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks