Switch to full style
Project under GPL source codes are posted here
Post a reply

Java System Tray Application using Visual Basic

Sat Nov 08, 2008 1:07 am

 Project Name:   Java System Tray Application using Visual Basic
 Programmer:   Jeeva S
 Type:   Application
 Technology:  Java
 IDE:   NONE
 Description:   Run exe file from java application , this is Simple Java System Tray Application.. This Works
only in Windows Environment. No Need For JNI.


SystemTray.gif
SystemTray.gif (4.99 KiB) Viewed 4900 times

java code
/*
* @(#)SystemTray.java 1.0 02/10/03
*
* Developed By Jeeva S
*
*/
package com.jeeva.tray;

import java.awt.*;
import java.awt.event.*;
import java.io.IOException;
class SystemTray extends Frame implements ActionListener {

public SystemTray() {
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {

/**********Quitting System Tray****************/
try {
process = Runtime.getRuntime().exec("data/SystemTrayKill.exe");
}catch(IOException _IoExc) { }

dispose();
System.exit(0);
}
});
setLayout(new BorderLayout());
setSize(400, 200);
setTitle("SystemTray In Java");
Label LblTray = new Label("System Tray Demo in Java !",1);
LblTray.setBackground(Color.black);
LblTray.setForeground(Color.white);
LblTray.setFont(new Font("Arial",1,25));
add("North",LblTray);
CmdTray = new Button("Go To System Tray");
CmdTray.addActionListener(this);
add("Center",CmdTray);
Label LblDevelop = new Label("Developed By Jeeva S ([email protected])",1);
LblDevelop.setBackground(Color.black);
LblDevelop.setForeground(Color.white);
LblDevelop.setFont(new Font("Arial",1,15));
add("South",LblDevelop);

/**********Loading System Tray****************/
try {
process = Runtime.getRuntime().exec("data/SystemTray.exe");
}catch(IOException _IoExc) { }
show();
}

public void actionPerformed(ActionEvent evt)
{
if (evt.getSource().equals(CmdTray))
{
/**********Hiding Window****************/
try {
process = Runtime.getRuntime().exec("data/SystemTrayHide.exe");
}catch(IOException _IoExc) { }
}
}
public static void main(String args[]) {
SystemTray mainFrame = new SystemTray();
}

Button CmdTray;
Process process;
}



Attachments
SystemTrayInJava.zip
(61.96 KiB) Downloaded 885 times

Re: Java System Tray Application using Visual Basic

Sun Jan 20, 2013 9:40 pm

updated.

Post a reply
  Related Posts  to : Java System Tray Application using Visual Basic
 Learn ASP.NET,Visual basic 2005,08     -  
 Make your own Visual Basic 6 Version of "Tail for windows"     -  
 application on hotel management system     -  
 Connecting Java Application to C++ Application from Code     -  
 Java basic tutorials.doc     -  
 Integrating .NET application in Java     -  
 Open other application from java     -  
 Create set up file of my java application     -  
 Creating a Java Application Build using RAD 7     -  
 creating application for Samsung using java     -  

Topic Tags

Java Projects