Java also hates Xmonad (I spent ~30 mins trying workarounds and then gave up, as each time it went wrong, I had to restart my session)
setWMName "LG3D"
to my startupHook fixed most of the issues for me.Worked for me last time I checked (Arch, xmonad 0.11-7, openjdk 7.u45_2.4.3-1, intellij-idea-community-edition 13-1)