Internalframes getting focus

I'm using swing, and have a desktop pane with 4 internal frames. What I want to do is to detect when one of the
window gets the focus. I tried adding focuslisteners to
each of the internal frames, but it doesn't seem to be
detecting it. Also, the title bar doesn't seem to detect
any mouse events. Any ideas? Thanks in advanced.

Hi zyca,
Here is the code which i am using for such purpose and it is perfectly working. Ofcourse i am providing just the skeleton.
THis is in your InternalFrame class.
public class InternalFrameWindow

You can try using an InternalFrameListener for this purpose. The method InternalFrameActivated(InternalFrameEvent e) will catch such events. Then you can go through the InternalFrame in a desktop and can find wich frame it is.

Featured Post

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all. Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …