I’m using a Swing Timer to make webNotification, a custom JFrame, appear at a certain time. I want the user to have the option of clicking a “Hide” button that dismisses the notification and makes it come back after an hour. How can I achieve this?
I’m using a Swing Timer to make webNotification , a custom JFrame , appear
Share
javax.swing.Timerhas an initial delay; just set it to60 * 60 * 1000. YouractionPerformed()will be called an hour after invokingstart().Addendum: Here’s an example of a button that hide’s it’s enclosing window for a specified period of time.