java

recent posts related to java, jdbc, spring, etc.

How to add a keystroke to a Java Swing application

If you ever need to add a keystroke to a Java Swing application (or Scala Swing), this code may help. It shows how to add the [Command][M] keystroke on a Mac OS X system to a Swing application. It makes the keystroke available in a “Window” menu: