The constructor for a stock ImageMenuItem requires an AccelGroup. I think I should use the main Window's AccelGroup, but I'm not sure how to get it.
Edit: It turns out you can use the Stock Enum in ImageMenuItem (string label), not just in ImageMenuItem (string stockId, AccelGroup accelGroup). So I don't really need to get the Window's AccelGroup after all. Still, it would be nice to know for future reference.