In eclipse you can click Ctrl+I at any line, and it\'ll automatically indent the line or group of lines according to the indentation scheme you chose i
for Java NetBeans 7.1 and later, even in NetBeans 8.0 (That i´m currently using) and later, the shortcut is:
Alt+Shift+F
if you look into the KeyMap accessing from the menu: Tools -> Options -> Keymap, the "action" is Format defined with the Shortcut : Alt+Shift+F
KeyMap
Tools
Options
Keymap