Well if you have figured out the timed
thread part, then why can't you just call the dispose method of the JOptionPane ? In the constructor, the first parameter is of type Component... so it wants the parent component. if you were creating the JOptionPane within the code of your parent frame somewhere...the code might look like this (of course your timer would encompass this code).
this pops up the JOption as a modal dialog in front of the parent frame. Hopefully that helped you out a bit?