NetBeans join line macro

I was searching for a way to join lines in NetBeans in the same way you can join lines in vi (shift+j) or Eclipse (ctrl+alt+j). As far as I know, there is no predefined way to achieve this in my favourite IDE.

The powerful macro dialog lets you design your own editor macros and assign a keyboard shortcut to it. Hey – sure enough – here it is, the “join line macro”:

macro