Is it possible to add items to the applications dock menu?
EDIT: I think i miss phrased the question, i am not looking for a way to add an icon to the dock. what i am looking for is, when you right click on the itunes icon you get itunes control on the menu (play pause etc) i was wondering how can i add custom items to that menu.
Look into the com.apple.eawt package. Specifically, when you initialize your app, do something like the following:
If you are distributing this as a cross-platform application, Apple provides an Apple Java Extensions jar with stubs for the com.apple.eawt package, so the code will compile with non-Apple JDKs.