Java Virtal Machine.net

[ News ] rss

February 01, 2011

Mark Wielaard: New GPG key. Finally created a new GPG key using gnupg. The old one was a DSA/1024 bits one and 8 years old. The new one is a RSA/2048 bits one. I will use the new one in the future to sign any release tarballs I might create. pub 2048R/57816A6A 2011-01-29 Key f...

More »

February 01, 2011

Andrew Hughes: [SECURITY] IcedTea6 1.7.8, 1.8.5, 1.9.5 Released!. We are pleased to announce a new set of security releases, IcedTea6 1.7.8, IcedTea6 1.8.5 and IcedTea6 1.9.5. This update contains the following security updates: The IcedTea project provides a harness to build the source code from OpenJDK6 u...

More »

November/2024
SunMonTueWedThuFriSat
     12
3456789
1011121314 1516
17181920212223
24252627282930
       

[ Archives News
for 'Developers' ]

home > news > developers > transparent windows on linux

Transparent windows on Linux

JavaFX makes it easy to create non-rectangular windows -- just set a StageStyle.TRANSPARENT on your stage.style. We use rounded corners on our popup menus, and we also have a non-rectangular and alpha-blended splash screen. The other day I was checking how the cursors were looking on different platforms, and imagine my horror when I discovered how our new splash screen and rounded menus looked on Linux! Here they are -- as you can see you end up with white rectangles around the supposed-to-be-blended areas: That looks.... craptastic! Historically, the JDK didn't support alpha blended windows on Linux. However, that was added a while ago (I'm not sure exactly which version, but I think it was JDK 6 update 14). It turns out that the FX code which initializes the native frame for the stage does not do conditional checking for this; it simply turns off transparency on Linux. Fortunately, there's a System property you can set to force it to respect the transparency flag. You would obviously only do this if you know you are running on a JDK which supports transparency. And that's easy! In your startup code, do something like this: if (Utils.IS_LINUX and Utils.jdkAtLeast(1, 6, 0, 14)) { java.lang.System.setProperty("javafx.allowTransparentStage", "true"); } There are a couple of utility methods here that are simple - just looking at some system properties to determine whether we're on Linux and whether we're o...


Date: March, 25 2010
Url: http://blogs.sun.com/tor/entry/transparent_windows_on_linux


Others News

©2002-2019Java-Virtual-Machine.net it | website design software | website editor | mobiriseextensions.com | css menu maker