 <p>Make a <code>List&lt;JInternalFrame&gt;</code> and check <a href="http://docs.oracle.com/javase/7/docs/api/javax/swing/JInternalFrame.html#isSelected%28%29" rel="nofollow"><code>isSelected()</code></a> as you iterate though it.</p> <p>Addendum: See also this <a href="http://groups.google.com/group/comp.lang.java.programmer/msg/2e1b14bcad9bd7fa" rel="nofollow">example</a> that uses <code>Action</code> to select an internal frame from a menu.</p>