6
The code I have so far is this:
public static void main(String[] args)
{
SystemTray tray = SystemTray.getSystemTray();
Image image = new BufferedImage(10, 10, 10);
String tooltip = "Oi amiguinho";
PopupMenu menu = new PopupMenu("Pop Up");
TrayIcon icon = new TrayIcon(image, tooltip, menu);
try
{
tray.add(icon);
}
catch (AWTException e)
{
e.printStackTrace();
}
}
and I would like to know how I can capture a key pressed by the user even with the program running in the background.
Thank you.
But where do I add the
JTextField
??– Lucas Caresia
in scope, instantiating
– Leonardo Rocha
I’m sorry, I couldn’t, I could give you a full example ??
– Lucas Caresia