fadeFrame =
new Frame((Component)wtkxSerializer.readObject(getClass().getResource("translucent.wtkx")));
fadeFrame.setTitle("Translucent Window");
final FadeDecorator fadeDecorator = new FadeDecorator();
fadeFrame.getDecorators().insert(fadeDecorator, 0);
fadeFrame.getComponentMouseListeners().add(new ComponentMouseListener() {
public boolean mouseMove(Component component, int x, int y) {
return false;
}
public void mouseOver(Component component) {
fadeDecorator.setOpacity(0.9f);
component.repaint();
}
public void mouseOut(Component component) {
fadeDecorator.setOpacity(0.5f);
component.repaint();
}
});
fadeFrame.setLocation(80, 80);