Skip to main content
1-Visitor
April 19, 2017
Solved

Java Tool can't load in disply

  • April 19, 2017
  • 2 replies
  • 4067 views

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.

Best answer by sjuraj

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.

2 replies

15-Moonstone
April 20, 2017

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

ddhini1-VisitorAuthor
1-Visitor
April 20, 2017

Sorry ,Give me a brief explanation.

15-Moonstone
April 20, 2017

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

sjuraj15-MoonstoneAnswer
15-Moonstone
April 20, 2017

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.

ddhini1-VisitorAuthor
1-Visitor
April 20, 2017

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?

15-Moonstone
April 20, 2017

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