Skip to main content
1-Visitor
Apr 19, 2017 4:25 AM UTC
Solved

Java Tool can't load in disply

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.

sjurajAnswer
15-Moonstone
Apr 20, 2017 9:33 AM UTC

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.

10 replies

15-Moonstone
Apr 20, 2017 6:26 AM UTC

If you are using Swing tool then it is normal behaviour. You can set Swing dialog AlwaysOnTop.

Translate
ddhini1-VisitorAuthor
1-Visitor
Apr 20, 2017 6:29 AM UTC

Sorry ,Give me a brief explanation.

Translate
15-Moonstone
Apr 20, 2017 6:44 AM UTC

What is the tool which is not in-front ? Is it JOptionPane ?

Translate
sjuraj15-MoonstoneAnswer
15-Moonstone
Apr 20, 2017 9:33 AM UTC

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.

Translate
ddhini1-VisitorAuthor
1-Visitor
Apr 20, 2017 11:51 AM UTC

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?

Translate
15-Moonstone
Apr 20, 2017 12:24 PM UTC

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

Translate