how to make window active and textfield focused
I have written a fairly simple program, which takes a textfield entry and uses that to play a video and copy a file. The way I play the video is by a command line call to windows media player. (this program will only ever be run on a windows machine) The problem is, when the program has finished doing this, the wmp window is the active window, and my little jframe is not. thus in order to do it again, one must mouseclick the textfield prior to entering the text.
how do i get my jframe to be the active window and the one textfield in it to be focused, after having sent the video to wmp?