Comments (1)
I encountered the same error and also got around it by commenting out all but splashScreen.setVisible(false);
in hideSplashScreen()
.
FWIW, the JavaSE tutorial has this recommendation on Determining a Platform's Capabilities in this regard.
Not all platforms support all of these capabilities. An
UnsupportedOperationException
exception is thrown when code attempts to invoke thesetShape
orsetOpacity
methods on a platform that does not support these capabilities. Therefore, it is best practice to first check that the platform supports the capability that you want to implement. TheGraphicsDevice
class provides the
isWindowTranslucencySupported(GraphicsDevice.WindowTranslucency)
method that you can use for this purpose. You pass one of three enum values, defined in
GraphicsDevice.WindowTranslucency
, to this method:
*TRANSLUCENT
– The underlying platform supports windows with uniform translucency, where each pixel has the same alpha value.
*PERPIXEL_TRANSLUCENT
– The underlying platform supports windows with per-pixel translucency. This capability is required to implement windows that fade away.
*PERPIXEL_TRANSPARENT
– The underlying platform supports shaped windows.The
GraphicsConfiguration
class also provides the
isTranslucencyCapable
method to determine ifPERPIXEL_TRANSLUCENT
translucency is supported by the givenGraphicsConfiguration
object.The following code shows how to check for all three capabilities:
import static java.awt.GraphicsDevice.WindowTranslucency.*; // Determine what the default GraphicsDevice can support. GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); boolean isUniformTranslucencySupported = gd.isWindowTranslucencySupported(TRANSLUCENT); boolean isPerPixelTranslucencySupported = gd.isWindowTranslucencySupported(PERPIXEL_TRANSLUCENT); boolean isShapedWindowSupported = gd.isWindowTranslucencySupported(PERPIXEL_TRANSPARENT);
from anonymouth.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anonymouth.