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

The following are Jave code examples for showing how to use removeAncestorListener() 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.
+ Save this method
Example 1
Project: AgentWorkbench   File: HttpsConfigWindow.java   View Source Code Vote up 5 votes
@Override
public void ancestorAdded(AncestorEvent e) {
	JComponent component = e.getComponent();
	component.requestFocusInWindow();

	if (removeListener)
		component.removeAncestorListener(this);
}
 
Example 2
Project: RxJava2Swing   File: AncestorEventObservable.java   View Source Code Vote up 4 votes
@Override
protected void onDispose(JComponent w) {
    w.removeAncestorListener(this);
}