This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I have a java Swing application that works like this: a JFrame main window calls a non-modal JDialog box, once set visible, the focus naturally goes to the JDialog. This dialog displays a list of records. Upon the selection of one of the records, I want to set the focus back on the main window. To be specific, I want the main window to become the active window in which the user can do work. Sort of like bringing the main window to the front. How can I do that? FYI, I'm using JDK1.2.2 on WinNT platform
Two things I can think of, off the top of my head. First a window has a show and a hide method. If you have a main class that instantiates the two classes, you can have the main class control which window is hidden and which is shown. I do think the JDialog is modal, which means the other window cannot do anything until the JDialog is gone and closed. Hope that set you on a good path, and not one leading to the dark side Mark