Mega Code Archive

 
Categories / Java / Swing JFC
 

Use this method to determine whether a particular component has the focus

import javax.swing.JFrame; public class Main {   public static void main() {     JFrame f = new JFrame();     boolean b = f.isFocusOwner();   } }