File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 Android Security Essentials Live Lessons this week in the Android 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: 38107
    
  22
We usually discuss that sort of thing on the Swing forum. Moving.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to set a component's GraphicsConfiguration or ImageCapabilities so it can be accelerated?
 
Similar Threads
StringTokenizer and null fields
Popup Frame
Centre window on leftmost screen with multiple monitors
facing problem while creating a Road/Pathway using Java3D
Mouse events on transparent Swing components