Disable default ALT key action in JFrame under Windows
问题 I would like to let my JFrame under Windows not act upon an ALT key press. To clarify, when you execute the following snippet of code: import javax.swing.*; public class FrameTest { public static void main(String[] args) throws Exception { JFrame frame = new JFrame(); frame.setSize(400, 400); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); } } and press the ALT key and then the arrow down key, you get a menu in the upper left corner in which you can choose to