List of utility methods to do JDialog Fade
void | fadeIn(final JDialog dialog) Creates an animation to fade the dialog opacity from 0 to 1. final Timer timer = new Timer(10, null); timer.setRepeats(true); timer.addActionListener(new ActionListener() { private float opacity = 0; @Override public void actionPerformed(ActionEvent e) { opacity += 0.15f; dialog.setOpacity(Math.min(opacity, 1)); ... |
void | fadeIn(final JDialog dialog, int delay, final float incrementSize) Creates an animation to fade the dialog opacity from 0 to 1. final Timer timer = new Timer(delay, null); timer.setRepeats(true); timer.addActionListener(new ActionListener() { private float opacity = 0; @Override public void actionPerformed(ActionEvent e) { opacity += incrementSize; dialog.setOpacity(Math.min(opacity, 1)); ... |
void | fadeInAndOut(final JDialog dialog) Creates an animation to fade the dialog opacity from 0 to 1, wait at 1 and then fade to 0. fadeInAndOut(dialog, 50, 0.05f, 10000); |