aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to set a component's GraphicsConfiguration or ImageCapabilities so it can be accelerated? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to set a component Watch "How to set a component New topic
Author

How to set a component's GraphicsConfiguration or ImageCapabilities so it can be accelerated?

C Wang
Greenhorn

Joined: Jun 05, 2009
Posts: 3
I tried creating a blank JFrame and getGraphicsConfiguration().getImageCapabilities().isAccelerated() returns false

Is there a way to set a component's GraphicsConfiguration or ImageCapablities?


---
GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices() only had length of 1

GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()[0].getConfigurations() had a length of 6

I looped through them and checked for each of their getImageCapabilities().isAccelerated(), each one returned false

really confused
---

added "-Dsun.java2d.opengl=true" to the run parameters and getConfigurations() only had a length of 1, and isAccelerated() returned true

how can I do this in an applet though??
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39393
    
  28
We usually discuss that sort of thing on the Swing forum. Moving.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to set a component's GraphicsConfiguration or ImageCapabilities so it can be accelerated?