java类库详细讲解
源代码在线查看: focus_nofocus.html
Preventing a Component from Gaining the Focus
(Java Developers Almanac Example)
BODY CODE {font-family: Courier, Monospace; font-size: 11pt} TABLE, BODY {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt} PRE {font-family: Courier, Monospace; font-size: 10pt} H3 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11pt} A.eglink {text-decoration: none} A:hover.eglink {text-decoration: underline} -->
The Java Developers Almanac 1.4
Order this book from Amazon.
Home
>
List of Packages
>
java.awt
[77 examples]
>
Focus
[16 examples]
e611.
Preventing a Component from Gaining the Focus
When setFocusable() is called, the user will be able
to give the component the focus (by clicking on it or through focus
traversal), nor be able to acquire the focus.
component.setFocusable(false);
Related Examples
e610.
Determining Which Component or Window Has the Focus
e612.
Preventing a Window from Gaining the Focus
e613.
Listening to All Focus Changes Between Components in an Application
e614.
Setting Focus Traversal Keys in a Component
e615.
Setting Focus Traversal Keys for the Entire Application
e616.
Moving the Focus to the Next or Previous Focusable Component
e617.
Modifying the Focus Traversal Order
e618.
Setting the Initial Focused Component in a Window
e619.
Finding the Next Focusable Component
e620.
Determining If a Focus Lost Is Temporary or Permanent
e621.
Determining the Opposite Component of a Focus Event
e622.
Validating a JTextField When Permanently Losing the Focus
e623.
Removing the Focus from the Application
e624.
Activating a Keystroke When Any Component in the Window Has Focus
e625.
Activating a Keystroke When Any Child Component Has Focus
See also:
Colors
Components
Containers
Cursors
Drawing
Events
Frames
GridBagLayout
Images
Shapes
Simulating Events
Text
The Screen
© 2002 Addison-Wesley.