1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
if (e.getKeyCode() == KeyEvent.VK_F) { if (sp.isVisible()) { sp.setVisible(false); } else { sp.setVisible(true); } }