Since Java 5 (and certainly in Java 6) you can use borderless dialogs and/or dialogs with a mask (with alpha channels, i.e. transparency).
It would be very helpful to have such an advanced feature to make more compelling and appealing GUI’s. Also it would be fairly easy to translate this 100% to the web as well.
I filled case #292965
Right now you can already take the decoration (borders/header) of a dialog with some inline java (courtesy of Troy Elliot of Data Mosaic) so it should be doable in plain Java as well (since it IS plain java).
EDIT: this specific piece of code only seems to work on Mac OS X.
function onShow(firstShow, event) {
if (firstShow) {
// Code by Troy Elliot of Data Mosaic
//get all the children windows that the top-level servoy form owns
var allFrames = Packages.java.awt.Frame.getFrames()[0].getOwnedWindows()
//loop through all children windows until we find the one we just opened
for (var i = 0; i < allFrames.length && !thisFiD; i++) {
//we found the form just opened
if (allFrames[i].getName() == 'nameOfYourDialog') {
//assign the FiD object to a variable to make the code easier to read
var thisFiD = allFrames[i]
//destroy FiD so it can be undecorated
thisFiD.dispose()
//undecorate FiD
thisFiD.setUndecorated(true)
//set to be modal because modal argument in application.showFormInDialog lost with dispose()
thisFiD.setModal(true)
//show FiD again
thisFiD.setVisible(true)
}
}
}
}
As for masking dialogs. You can take something like this:
And show it in a real dialog with a real mask (instead of a transparant tabpanel like this):
You might say, why use a dialog with mask for this when you can already do this with a transparant tabpanel ?
Answer: Simple, it doesn’t have all those benefits of a real (modal) dialog.
And this is just ONE small example.
Here is also some Oracle/Sun info on making translucent/shaped windows:
http://java.sun.com/developer/technical … d_windows/