Results 1 to 2 of 2
  1. #1
    Chasingxsuns is offline Member
    Join Date
    Jul 2009
    Posts
    56
    Rep Power
    0

    Default JOptionPane notification

    If an application is minimized, is there a way to notify the user that a JOptionPane has popped up? The program is like a flash card application and I use JOptionPane.showMessageDialog(...) to show the right answer. However it can be set for any time length so it may be minimized for a long time. If this happens, there is no notification that the program has updated and the timer has began again. So there is a chance the user will miss out on a number of problems. Does JOptionPane have some kind of method I could use to notify the user? Or is there any other way I can do it? I want the minimized program to say "HEY PAY ATTENTION TO ME REAL FAST!"

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,457
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by Chasingxsuns View Post
    If an application is minimized, is there a way to notify the user that a JOptionPane has popped up? The program is like a flash card application and I use JOptionPane.showMessageDialog(...) to show the right answer. However it can be set for any time length so it may be minimized for a long time. If this happens, there is no notification that the program has updated and the timer has began again. So there is a chance the user will miss out on a number of problems. Does JOptionPane have some kind of method I could use to notify the user? Or is there any other way I can do it? I want the minimized program to say "HEY PAY ATTENTION TO ME REAL FAST!"
    You have to de-iconify your entire JFrame when you want to notify the user; that way the JOptionPane is visible (as well as the entire application). Look at the setState( ... ) method or the setExtendedState( ... ) method. The JFrame inherits those methods from the Frame class.

    kind regards,

    Jos

Similar Threads

  1. read notification of mail
    By javastuden in forum Advanced Java
    Replies: 0
    Last Post: 12-03-2009, 11:19 AM
  2. threads waiting the same event :searching for a specific notification
    By nabila.abdessaied in forum Threads and Synchronization
    Replies: 2
    Last Post: 03-31-2009, 10:41 AM
  3. threads waiting the same event :searching for a specific notification
    By nabila.abdessaied in forum Threads and Synchronization
    Replies: 0
    Last Post: 03-30-2009, 05:33 PM
  4. JOptionpane
    By tommyyyy in forum New To Java
    Replies: 2
    Last Post: 03-20-2009, 08:33 AM
  5. JOptionPane
    By whosadork in forum New To Java
    Replies: 2
    Last Post: 10-23-2008, 02:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •