Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Creating System Tray Icon WinXP

  1. #1
    Junior Member
    Join Date
    Apr 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Creating System Tray Icon WinXP

    I have a program, it is on windows xp. The program is similar to a soft phone and is used on corporate computers. I work in the office and the program has features such as "Wrap-up", "Not-Ready" and "Ready" depending on what state your in, it interacts differently with your call stats.

    The program it's self I can not obtain the source for nor can I alter it. I did not develop the program but am simply a user. Unfortunately the program does not minimize to the system tray/notification area in XP. With it not going to notification area, many reps have had an ill fated "Wrap-Up" time period where one had accidentally left agent state in wrap during a period of time where they are expecting to be in ready waiting for calls.

    It kills stats and is annoying. I want to know if there is any feasible way to create a system tray/notification area "bubble pop up or similar" to function in 2 ways. Minimize to that position rather than normal task bar area and also to have an icon which represents the state that the soft phone is in. Whether it be wrap not ready or ready and waiting. Hoping for color coded icon representation, green is ready, yellow is wrap and red is not ready.

    Speaking with some co-workers, it was mentioned that a possibility would be to parse the text of the log files for indication of agent state. Given I can not touch the actual app it's self, logs are stored per day of week and are persistent and updated per user/rep signed into computer. My user space has 1 log file for every day of the week and provides my state and reason codes for being in the state as with time frames and so forth. If a notification icon was implemented and functioned by pulling updated info from these .txt files to provide a color coded notification icon * to show agent state* would this be challenging?
    Last edited by domezone; April 24th, 2012 at 05:34 AM. Reason: update


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Creating System Tray Icon WinXP

    I'm not sure what you're asking, exactly. It's not hard to create a SystemTray icon, and this is the first result for googling "java system tray": How to Use the System Tray (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Other Swing Features)

    But if you're asking how hard it is to parse through the log files, that really depends on how they're set up, your experience, how reliable they are, etc. It's extremely dependent on context, so it's not really a question we can answer.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Junior Member
    Join Date
    Apr 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Creating System Tray Icon WinXP

    Quote Originally Posted by KevinWorkman View Post
    I'm not sure what you're asking, exactly. It's not hard to create a SystemTray icon, and this is the first result for googling "java system tray": How to Use the System Tray (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Other Swing Features)

    But if you're asking how hard it is to parse through the log files, that really depends on how they're set up, your experience, how reliable they are, etc. It's extremely dependent on context, so it's not really a question we can answer.

    As I would assume you have gathered, my experience and skill are not on par with your own. I asked the question as I myself could not answer it. Given my lack of experience and in my haste, I posted after searching for a brief period of time. I had already come across a few links similar to what you had provided, my only real question/confusion is if parsing logs would be feasible, meaning in a real world situation *on business computers at that* would it be reasonable to have an app that parses logs and displays a certain color for the notification icon. The notification icon and its ability to function would be separate from the program it's self as I would absolutely need it to depend completely on the .txt files as I have no intention of altering or manipulating the actual app it's self.

    If it is simple and you feel it rudimentary, I apologize. This area of computing has not attracted my attention until recently. Now that I would like extended functionality with limited resources or ability to run alternatives/fixes, I just wanted to know if me devoting time and trying would pan out or at the very least have the possibility.

    Lack of information on what I mean by "business computers" could hinder an answer as a solution might not actually function depending on how strict "business computers" definition is. I get that but just picture a common setup and security implementation for a large office setup.

  4. #4
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Creating System Tray Icon WinXP

    Quote Originally Posted by domezone View Post
    As I would assume you have gathered, my experience and skill are not on par with your own. I asked the question as I myself could not answer it. Given my lack of experience and in my haste, I posted after searching for a brief period of time. I had already come across a few links similar to what you had provided, my only real question/confusion is if parsing logs would be feasible, meaning in a real world situation *on business computers at that* would it be reasonable to have an app that parses logs and displays a certain color for the notification icon. The notification icon and its ability to function would be separate from the program it's self as I would absolutely need it to depend completely on the .txt files as I have no intention of altering or manipulating the actual app it's self.

    If it is simple and you feel it rudimentary, I apologize. This area of computing has not attracted my attention until recently. Now that I would like extended functionality with limited resources or ability to run alternatives/fixes, I just wanted to know if me devoting time and trying would pan out or at the very least have the possibility.

    Lack of information on what I mean by "business computers" could hinder an answer as a solution might not actually function depending on how strict "business computers" definition is. I get that but just picture a common setup and security implementation for a large office setup.
    Fair enough. So if you want my opinion with the above disclaimer about your context possibly making me completely wrong, I offer the following:

    Parsing through the logs is certainly doable (Lesson: Basic I/O (The Java™ Tutorials > Essential Classes)). Setting up an interval (how often you parse the logs) and logic (which log to parse at which time) is the part that might get tricky depending on your context, but the basics aren't hard. Then on top of that, you might want to create a GUI that lets the user tweak these settings, so the project could grow larger than what you originally expected. None of that is necessarily hard, but small things (logs being saved to a different place, or at a different time or interval, etc) can complicate things greatly, which is why I hesitated to try to answer with more detail.

    But this does seem like a hack because you don't have the original source code. So if I were you, I'd try to get my hands on the source code and modify that. That'll make everyone's life a lot easier.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    Junior Member
    Join Date
    Apr 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Creating System Tray Icon WinXP

    Quote Originally Posted by KevinWorkman View Post
    Fair enough. So if you want my opinion with the above disclaimer about your context possibly making me completely wrong, I offer the following:

    Parsing through the logs is certainly doable (Lesson: Basic I/O (The Java™ Tutorials > Essential Classes)). Setting up an interval (how often you parse the logs) and logic (which log to parse at which time) is the part that might get tricky depending on your context, but the basics aren't hard. Then on top of that, you might want to create a GUI that lets the user tweak these settings, so the project could grow larger than what you originally expected. None of that is necessarily hard, but small things (logs being saved to a different place, or at a different time or interval, etc) can complicate things greatly, which is why I hesitated to try to answer with more detail.

    But this does seem like a hack because you don't have the original source code. So if I were you, I'd try to get my hands on the source code and modify that. That'll make everyone's life a lot easier.
    That was a great answer and I appreciate it. Logs are in a static location for all networked computers in the call center. Granted at home reps might have or rather should have different locations, that can be factored in.

    The reason I can't get the source is because the software is not my own or the companies. It is run, updated and maintained by a 3rd party. I can not hook anything to it, nor edit anything about it. I can not simply ask for the source code, even if it was my companies proprietary software I would assume I couldn't.

    The functionality of having agent idle status displayed as a desktop notification icon or desktop widget is leaps and bounds beyond our current implementation of the software it's self. Requests have been submitted already to implement such a feature but where shot down. I don't want to hurt the program and given logs are read/write on your own networked partition, the files and names are identical.

    Appreciate the response, I will pass it along.

Similar Threads

  1. JToggleButton's icon won't show up when pressed!
    By andreiutz10 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: November 30th, 2011, 05:03 AM
  2. window icon
    By luisp88 in forum AWT / Java Swing
    Replies: 6
    Last Post: September 29th, 2011, 01:56 PM
  3. Moving Icon in gridlayout SWING
    By Loodistobilo in forum What's Wrong With My Code?
    Replies: 3
    Last Post: November 24th, 2010, 07:59 PM
  4. [SOLVED] I cant load the icon!!!!
    By chronoz13 in forum AWT / Java Swing
    Replies: 12
    Last Post: January 22nd, 2010, 03:52 AM
  5. Replies: 8
    Last Post: December 9th, 2009, 04:45 PM

Tags for this Thread