Reputation: 143
I am developing an app that requires multiple JFrames. The JFrame writes to a file, then is disposed. I want to have a KeyListener listen for the same key press, throughout the entire project without having to create the KeyListener in each class. Is there a way?
Upvotes: 0
Views: 473
Reputation: 664
I agree that key bindings should be used, but since I can't delete my accepted answer I have to leave this here.
Upvotes: 3