Total members 11894 |It is currently Thu Nov 21, 2024 6:28 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka






 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.


Attachment:
SystemTray.gif
SystemTray.gif [ 4.99 KiB | Viewed 4899 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 884 times

_________________
Please recommend my post if you found it helpful. ,
java,j2ee,ccna ,ccnp certified .
Author:
Expert
User avatar Posts: 838
Have thanks: 2 time

updated.


_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 2 posts ] 

  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     -  
 about packet tracer for my web application in java....     -  
 Create set up file of my java application     -  
 Creating a Java Application Build using RAD 7     -  



Topic Tags

Java Projects







Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com