Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
I made a tool using J-link and Java .I successfully loaded my tool in creo Session using Auxiliary Application=>Register an it loaded Successfully.When I click the button to open the tool then it will load but can't get the tool in-front of display. Everytime I am Using Alt+Tab and access the tool.Please help me to solve this .Thanks in advance.
Solved! Go to Solution.
Well, this is matter of Java not a J-link.
Solution could be to set JDialog always on top (see docs Window (Java Platform SE 7 )).
If you need your dialog to be shown on top of Creo only, you will probably have to make windows event hook using JNI (or JNA) and user32.dll library, but I cant give you any example, you will have to search for solution on internet.
If you are using Swing tool then it is normal behaviour. You can set Swing dialog AlwaysOnTop.
Sorry ,Give me a brief explanation.
What is the tool which is not in-front ? Is it JOptionPane ?
No it is a JDialog .When i entered first time in proe i click the button to open my tool .But it cant loading.I am using Alt +tab key to bring that front.But afterwards its working perfect
Well, this is matter of Java not a J-link.
Solution could be to set JDialog always on top (see docs Window (Java Platform SE 7 )).
If you need your dialog to be shown on top of Creo only, you will probably have to make windows event hook using JNI (or JNA) and user32.dll library, but I cant give you any example, you will have to search for solution on internet.
Yes you are absolutely right. j dialog is set to front but am using j frame to show some message in between process.But it can't load but it opened in background.how to rectify this?
You have to search on the internet. This can be useful java - Is it possible to bring JFrame to front but NOT focus? - Stack Overflow
Thank you, am trying....
skvarka juraj,I set my parent dialog SetAlwaysTop equal to True.But when i use this for JOptionPane.showmessageialog it can't load to front ..Don't know how to overcome this.please help me
Try this: java - JOptionPane won't show its dialog on top of other windows - Stack Overflow
But if you need only to display info use session.UIShowMessageDialog instead.