java - Bringing a joptionpane infront of all other windows -


the concept simple. i'd bring joptionpane frame in front of all other open windows/applications.

i'd without of applescript (external java) or third party library. pure java.

i have searched on couldn't find 1 single non-third party solution. (.tofront() "focuses" on window doesn't display in front.)

the joptionpanel , jdialog code:

joptionpane optionpane = new joptionpane(p4.msg, joptionpane.information_message, joptionpane.yes_option);     jdialog dialog = optionpane.createdialog("important1!");     dialog.setvisible(true); 

where p4 object containing public string.

try this, assuming calling joptionpane frame, pass frame reference using this, should show on top of @ least running program assuming has focus.

    joptionpane.showmessagedialog(this, p4.msg,"important1!", joptionpane.information_message);        

Comments

Popular posts from this blog

python - Specify path of savefig with pylab or matplotlib -

How to run C# code using mono without Xamarin in Android? -

c# - SharpSsh Command Execution -