how can I upload another frame (when i am running on my frame) by press CTRL+SPACE?
I mean , I am on the main frame, and I want that by push CTRL+SPACE in the keyboard, another frame will coming up.
i've tried some things but I just found the option with ALT + 'key' (mnemonic) but Iwant CTRL + SPACE
this.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent ev) {
if(ev.getKeyCode() == KeyEvent.VK_CONTROL + KeyEvent.VK_SPACE){
System.out.println("Halleluya!");
}
}
});
this is my code, but it doesnt work. But if i do just like this:
this.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent ev) {
if(ev.getKeyCode() == KeyEvent.VK_SPACE){
System.out.println("Halleluya!");
so i get "Halleuya" on the console. but i need just when CTRL + SPACE...