G
Guest
Gast
ich möchte gern, dass bei meinem PopUp menu im tray bereich, ein radio button dirn ist. hier mal der code:
was soll ich jetz oben für den RadioButton eingeben?
Code:
PopupMenu popup = new PopupMenu();
MenuItem exit = new MenuItem("Exit");
if (SystemTray.isSupported())
{
ActionListener exitlistener = new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
System.exit(1);
}
};
popup.addSeparator();
exit.addActionListener(exitlistener);
popup.add(exit);
SystemTray tray = SystemTray.getSystemTray();
Image image = Toolkit.getDefaultToolkit().getImage("1.jpg");
TrayIcon trayIcon =new TrayIcon( image, "Shutdown",popup);
trayIcon.setImageAutoSize( true );
try
{
tray.add(trayIcon);
}
catch(AWTException e)
{
System.err.println(e);
}
was soll ich jetz oben für den RadioButton eingeben?