MenuBar using java

lelereb

Registered
Hi.

Someone knows if there is a parameter to eliminate the first menu that system append to any java program.

My problem is i need to write pure java 100% programs, and this menu appearing only on osx is not implementable without using com.apple....

For example if i need to make some operation before the window closing i can intercept the use of red button on title bar, i can intercept an exit menuItem in a menu implemented by myself, but i can't intercept command-q! Also if i add another menu with an item linked by myself with command-q the default one has the priority.

Remember that i need to make a pure java 100% app.
 
I found no way to eliminate the first menu, but i found the solution in adding a shutdownHook to the main class.
The shutdownHook intercept boot the System.exit linked to the use of the red closing button and the use of command-q combination.

If someone has the same problem i can detail more.
 
Back
Top