Is there any way to bring a window to the front using Java? Maybe using some operating system library?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It seems it is possible, but then your solution would be very OS specific.
Theoretically it can be done by placing a call to win32 API in the following sequence:
Now the problem comes ‘how to call them from java?’. Well all the above functions are defined in
user32.dlland it can be accessed by JNA.Some sample references to user32 API using JNA are:
Use google to find more.
Hope this will help.