You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running in eclipse in linux I get the below error :
Exception in thread "main" java.lang.UnsupportedOperationException: TRANSLUCENT translucency is not supported.
at java.awt.Window.setOpacity(Window.java:3598)
at java.awt.Frame.setOpacity(Frame.java:962)
at edu.drexel.psal.anonymouth.gooie.SplashScreen.hideSplashScreen(SplashScreen.java:154)
at edu.drexel.psal.anonymouth.gooie.ThePresident.<init>(ThePresident.java:164)
at edu.drexel.psal.anonymouth.gooie.ThePresident.main(ThePresident.java:70)
I was able to rectify this by removing line 154 in SplashScreen.java
The text was updated successfully, but these errors were encountered:
Not all platforms support all of these capabilities. An UnsupportedOperationException exception is thrown when code attempts to invoke the setShape or setOpacity 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. The GraphicsDevice 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 if PERPIXEL_TRANSLUCENT translucency is supported by the given GraphicsConfiguration 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);
When running in eclipse in linux I get the below error :
I was able to rectify this by removing line 154 in SplashScreen.java
The text was updated successfully, but these errors were encountered: