Java Code Examples for javax.swing.JComponent.hasFocus()

The following are Jave code examples for showing how to use hasFocus() of the javax.swing.JComponent class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: rapidminer   File:   Source Code and License Vote up 6 votes
private boolean startCellEditingAndRequestFocus(int row, int column) {
	if (isCellEditable(row, column)) {
		editCellAt(row, column);
		Component editorComponent = getEditorComponent();
		if (editorComponent != null) {
			if (editorComponent instanceof JComponent) {
				JComponent jComponent = (JComponent) editorComponent;
				if (!jComponent.hasFocus()) {
				return true;
	return false;