Method hasFocus()
Return type: boolean
Member of:
java.awt.Component
[
api documentation
] [
main menu
]
Examples of how the element is used
(one line per example):
[
add your own example
]
1
codeEditorPane.getCaret().setVisible(codeEditorPane.hasFocus());
2
codeEditorPane.getCaret().setVisible(codeEditorPane.hasFocus());
3
if(!component.hasFocus()) {
4
if (!hasFocus()) requestFocus();
5
if (!tabPane.hasFocus() || !isSelected)
6
if (!tabPane.hasFocus() || !isSelected)
7
if (!textArea.hasFocus()) textArea.requestFocus();
8
if(component.hasFocus())
9
assertTrue(textfield.hasFocus());
10
if (hasFocus()) {
11
if (button.isFocusPainted() && button.hasFocus()) {
Java and J2SE are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other Countries.