Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  Component.createImage()  (Read 1585 times)
0 Members and 1 Guest are viewing this topic.
Offline zeroone

Sr. Member
**

Posts: 295
Medals: 10



« on: 2006-10-23 13:51:19 »

I noticed that an image created with Component.createImage() can be displayed a lot faster than a new BufferedImage.  Why is that?
Offline CaptainJester

JGO Neuromancer
****

Posts: 1138
Medals: 8


Make it work; make it better.


« Reply #1 on: 2006-10-23 19:33:53 »

Component.createImage() automatically creates an image compatible with the screen settings.  Te get a BufferedImage that is compatible, you have to use java.awt.GraphicsConfiguration.createCompatibleImage(...)  An image that is not compatible is converted to the screen settings every time it is drawn.  One that is already compatible is not.

Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.058 seconds with 22 queries.