Results 1 to 10 of 10
Like Tree1Likes
  • 1 Post By KevinWorkman

Thread: Make a jframe "shine" on the taskbar

  1. #1
    danoc93 is offline Member
    Join Date
    Apr 2012
    Posts
    37
    Rep Power
    0

    Default Make a jframe "shine" on the taskbar

    Hi... have you ever used MSN messenger or any application that as soon as something happens the icon in the task bar lights up and starts shining...?

    I developed a chat application and i want that as soon as i receive a new pm the pvt window "shines"... it happens when the window is opened for the first time, but if you keep it opened as soon as u receive a new pm it won't do it again...

  2. #2
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    758
    Rep Power
    8

    Default Re: Make a jframe "shine" on the taskbar

    The trick is to use the JFrame's toFront() method.

  3. #3
    danoc93 is offline Member
    Join Date
    Apr 2012
    Posts
    37
    Rep Power
    0

    Default Re: Make a jframe "shine" on the taskbar

    I use toFront but it opens the window and brings it to front... i need it to stay minimized and then to shine

  4. #4
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    758
    Rep Power
    8

    Default Re: Make a jframe "shine" on the taskbar

    I've tried it in my Windows box. When the JFrame is minimized it just flashes and doesn't open the window. But if my window is open is indeed become a top most window.

  5. #5
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,932
    Rep Power
    8

    Default Re: Make a jframe "shine" on the taskbar

    I'd recommend using SystemTray and just changing the icon.
    DarrylBurke likes this.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  6. #6
    danoc93 is offline Member
    Join Date
    Apr 2012
    Posts
    37
    Rep Power
    0

    Default Re: Make a jframe "shine" on the taskbar

    Mmmm... can I use the toFront and the minimize without making it noticeable to the user? I think that would work...

  7. #7
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,932
    Rep Power
    8

    Default Re: Make a jframe "shine" on the taskbar

    Quote Originally Posted by danoc93 View Post
    Mmmm... can I use the toFront and the minimize without making it noticeable to the user? I think that would work...
    That seems like a hack, especially because it might behave differently on different systems. But it's really up to you.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  8. #8
    danoc93 is offline Member
    Join Date
    Apr 2012
    Posts
    37
    Rep Power
    0

    Default Re: Make a jframe "shine" on the taskbar

    Well, I'll try to use that, if it doesn't work, well I will cry :'(... does anybody else have another possible solution?

  9. #9
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,932
    Rep Power
    8

    Default Re: Make a jframe "shine" on the taskbar

    Quote Originally Posted by danoc93 View Post
    Well, I'll try to use that, if it doesn't work, well I will cry :'(... does anybody else have another possible solution?
    You have two possible solutions, neither of which is very hard to test. I'd recommend trying them both out and letting us know how they work (and if they don't work, specifically why not), then we can go from there.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  10. #10
    danoc93 is offline Member
    Join Date
    Apr 2012
    Posts
    37
    Rep Power
    0

    Default Re: Make a jframe "shine" on the taskbar

    toFront doesn't make the icon shine when its minimized, it just does something weird like losing focus of the window i'm into but nothing else, it doesn't either shine or show in the front...

Similar Threads

  1. How do I make a "File does not exist" error?
    By name in forum New To Java
    Replies: 13
    Last Post: 01-16-2012, 04:19 PM
  2. How to make a "real" console program?
    By Pojahn_M in forum New To Java
    Replies: 3
    Last Post: 12-26-2011, 01:15 AM
  3. Replies: 1
    Last Post: 09-30-2011, 01:28 PM
  4. Replies: 4
    Last Post: 01-04-2010, 01:23 PM
  5. Replies: 1
    Last Post: 10-20-2008, 07:35 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
  •