CHAPTER 13

image

Keystrokes, Actions, and Bindings, Oh My!

There are a number of ways that graphical applications obtain user input. This chapter focuses on how applications deal with user input from the keyboard. This is all about what happens when the user presses a key, and how applications perceive and react to this kind of event.

Getting in a Bind: Looking at Bindings

In the section entitled “Menu Mnemonics and Accelerators" in Chapter 10, you learned how convenient it is to associate a particular keystroke1 with an ActionListener2 for menu items. This association is called a binding. Doing this allowed you to simplify the process of causing some ...

Get Swing for Jython: Graphical Jython UI and Scripts Development using Java Swing and WebSphere Application Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.