Skip to main content

Prevent new JFrame from taking focus

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2004-10-13

I have a Java application running on Windows 7 which displays a JFrame based on data received from a server. The problem is that when I have focus on another application, whether it is Word, Notepad, or a browser, when my application displays a new JFrame, the JFrame grabs focus. This is especially annoying when I am typing in the other application and lose focus to this new JFrame. How can I prevent the new JFrame from grabbing focus?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-06-11

your problem is related to SwingX/SwingLabs in that .... ? Base/core Swing questions should be asked in base/core Swing forums