B
blacksh33p
Gast
Code:
Image image = Toolkit.getDefaultToolkit().getImage(
Ui.class.getResource( "/images/brief.gif") );
PopupMenu popup = new PopupMenu();
MenuItem item = new MenuItem("Exit");
item.addActionListener( new ActionListener() {
public void actionPerformed( ActionEvent e ) {
System.exit( 0 );
}
});
popup.add( item );
TrayIcon trayIcon = new TrayIcon( image, "SCClient Tray ", popup );
trayIcon.setImageAutoSize( true );
SystemTray tray = SystemTray.getSystemTray();
tray.add( trayIcon );
alles im konstruktor
leider unterstreich er mir TrayIcon und SystemTray, weil er es nicht findet..
hab :
import java.awt.*;
import java.awt.event.*;
import java.net.InetAddress;
import java.swing.*;
drin kann einer helfen?