I work in a manufacturing facility, and I'm working on developing a system to send process related notifications to assembly line workers. Events in an Oracle database trigger the display and use the UTL_TCP package to send a message containing a URL to the target PC. The PC has a small Java program listening for the message, which then opens the URL in Internet Explorer in kiosk mode using:
where "request" is a variable that contains the URL.
The problem I'm having is that when other applications are running, the IE window often opens behind them. I need to be able to force it to be on top of all other windows. How can I do this? I'm also open to suggestions for other approaches that don't involve using IE.
Thanks for the suggestion. That does indeed cause the browser to open on top of other applications, but it still leaves me with a few different issues. I want the displayed page to take up the entire screen, hence launching IE in kiosk mode, which I don't see a way to do through the Desktop class. I also need to be able to close the browser window when I want the message to go away. In the current implementation, I'm doing this by calling the destroy() method of the Process returned from Runtime.exec().
I understand that the message is HTML. If it is simple HTML, Java itself can quite easily render it, as described here: http://docs.oracle.com/javase/tutorial/uiswing/components/text.html.
You have better control than over an external process.
If your messages are too complex for Swing based rendering, google for "java embedded browser".
Unfortunately it isn't just simple HTML. Some of the pages I need to display are Oracle Application Express pages that dynamically generate content based on parameters passed in the URL. My first attempt actually involved using a JEditorPane to display the content, but it did a horrible job of rendering most of what I need to show. sigh I guess I'm going to be learning how to embed a browser into a java program.