1. Java - Handle multiple events with one function? stackoverflow.comFirst of all, I am a complete Java NOOB. I want to handle multiple button presses with one function, and do certain things depending on which button was clicked. I am using ... |
2. Java Event Binding stackoverflow.comI'm new in windows application development using java. The question is this "How to i bind events to custom class methods? As fas i have seen i can register listener classes to ... |
3. ActionListener as key binding stackoverflow.comI am in a situation where i have a class, ActionFactory that produces ActionListener s to be used in menu items and buttons. Now i want to bind some of these ... |
4. How to make all components in an application respond to specific key event? stackoverflow.comI mean, like, pressing 'F5' in web browser will refresh the web page regardless of where the focus is. How do i do this in Java with GUI app? I can ... |
5. KeyAdapter is not responding ~ Java stackoverflow.comI'm creating a simple breakout game. However, the KeyAdapter isn't receiving the input. The code looks fine to me but maybe I'm missing something more basic?
|
6. Java KeyListener in separate class stackoverflow.comSo I have my main class here, where basically creates a new jframe and adds a world object to it. The world object is basically where all drawing and keylistening would ... |
7. Context dependent keyboard bindings in java Swing stackoverflow.comMy application has a tree control on the left and a number of forms, tabs, etc. on the right. When a user presses Ctrl+F a search panel appears under the tree ... |
8. Can't map Control-Backspace to a KeyStroke stackoverflow.comI am having trouble mapping the Control-Backspace key to a KeyStroke. The following makes no sense to me.
|
9. How to learn about the internals of Swing keystroke handling stackoverflow.comSwing can be a frustrating beast. Especially if you are trying to design an application with it that goes "against the grain" of the assumptions that the Swing designers used ... |
10. Setting a key-binding to perform the same action as in my action listener stackoverflow.comI have a JButton that's attached to an ActionListener, but I also wanted to add a shortcut key to the button to be more user-friendly. Say, the user can click the ... |
11. Using Key Bindings with Arrow Keys stackoverflow.comI'm creating a game that uses the arrow keys to move a sprite. I've added key bindings for the arrow keys and the letter n, but arrow keys aren't working. Here's ... |
12. Why does the keylistener stop working? stackoverflow.comIn my Java program, whenever I select some text from a JTextField, the keyListener stops detecting key presses. I noticed the same thing happens when a JButton is pressed. Do I ... |
13. proper way to listen to key presses java stackoverflow.comWhat is the best way to handle key presses in Java? I was trying to set up my KeyListener code but then I saw online KeyBinding is what should be ... |
14. Trouble with Key Bindings stackoverflow.comI am creating a Pong clone, and I am trying to use KeyBindings. This works:
|
15. Binding key presses to specific actions coderanch.comHi there I have a JTextField in my program . Upon the user pressing the backspace key , I wish to perform my own specific method, not the default one , which is to delete the previous character. I get the Keymap JTextField.getKeyMap() and I bind my user defined backspace action to the backspace key km.addActionForKeyStroke(KeyStroke.getKeyStroke (KeyEvent.VK_BACK_SPACE,0),myMethodHere) Ok , here is ... |
16. Warning :Virtual key binding coderanch.comHi, I have GUI application. When run on windows, it was working fine. when tried on solaris system. i get the following warning.. Warning: Cannot convert string " |
17. Swing Key bindings coderanch.comimport java.awt.*; import java.awt.event.*; import javax.swing.*; public class KeyTest { public static void main(String[] args) { JPanel panel = new JPanel(); panel.setFocusable(true); registerKeys(panel); JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.getContentPane().add(panel); f.setSize(300,175); f.setLocation(200,200); f.setVisible(true); } // symbol keyCode // = 61 // + 521 // - 45 // * 151 // / 47 private static void registerKeys(JPanel p) { KeyStroke plus = ... |
18. Understanding key bindings. coderanch.comThe fact that the following code does not do what I expect tells me I have misunderstood or missed something when reading the tutorials on key bindings. Even worse, it tells me that the stuff I have working in another project works only by accident I create a JFrame and add a JPanel and now using the input and action maps ... |
19. Key binding problem coderanch.comI have a couple of problems I have encountered while making Key bindings. 1. When I make a key binding to for example Ctrl+Alt+E and have an action performed to write a character to the JTextField I was typing in, the character I programatically added will be added as it should, but if there was originally a character associated to that ... |
20. key binding: VK_ALT and VK_SHIFT not working java-forums.orgFor modifier keys, you must provide the appropriate modifier for KeyStrokes on key press. However, if you want the KeyStroke on key release, then you do not include the modifier. So here would be the KeyStrokes for ALT press and ALT release: KeyStroke.getKeyStroke(KeyEvent.VK_ALT, InputEvent.ALT_DOWN_MASK, false) KeyStroke.getKeyStroke(KeyEvent.VK_ALT, 0, true) The issue you are experiencing with every other ALT press being sent to ... |
21. Key Binding problem java-forums.org |
22. Key Bindings & Swing Timer forums.oracle.comAs a reply to my last post seen [here|http://forums.sun.com/thread.jspa?threadID=5353266&tstart=30]. People told me to use Key Bindings and a swing timer to " use key bindings here, not a key listener; I'd also use a timer to move the image -- start the timer with key down and stop it with key up.". So I went to the tutorials of both of ... |
23. Key Bindings & Swing Timer forums.oracle.comAs a reply to my last post seen [here|http://forums.sun.com/thread.jspa?threadID=5353266&tstart=30]. People told me to use Key Bindings and a swing timer to " use key bindings here, not a key listener; I'd also use a timer to move the image -- start the timer with key down and stop it with key up.". So I went to the tutorials of both of ... |