Key « GlassPane « Java Swing Q&A





1. Help with GlassPane intercepting Key events    coderanch.com

My idea was to set a GlassPane( which covers the entire application ) and intercepts Key presses to tell if I get a control + s or a control + t. This is what I did... public class NotificationGlassPane extends JComponent implements KeyListener{ public NotificationGlassPane(){ init(); } public void init(){ super.addKeyListener(this); } public void keyPressed(KeyEvent arg0) { System.out.println(arg0.getKeyCode()); } public void ...