150 NetBeans Keyboard Shortcuts

NetBeans shortcuts are primarily used during the development of desktop, mobile, or web applications. These shortcuts help you save a significant amount of time while coding. Once you have stored the shortcut in your muscle memory, you will often use it without even thinking.

NetBeans is supported on all operating systems, including Windows, Linux, and macOS. However, below, we have listed NetBeans Shortcuts specifically for Windows users. We have organized the shortcuts into different groups such as debugging, coding in JAVA, testing, running, and compiling shortcuts.

Most used NetBeans Shortcuts

ActionNetBeans Shortcuts
Copy file pathAlt + Shift + L
Go to typeCtrl + O
Go to fileAlt + Shift + O
Go to the Unit testCtrl + Shift + T
Go to SourceCtrl + Shift + B
Go to declarationCtrl + B
Go to lineCtrl + G
Toggle add or remove bookmarkCtrl + Shift + M
Next bookmarkCtrl + Shift + .
Previous bookmarkCtrl + Shift + ,
Next usage or compile errorCtrl + .
Previous usage or compile errorCtrl + ,
Select next elementAlt + Shift + .
Select the previous elementAlt + Shift + ,
Select in ProjectsCtrl + Shift + 1
Select in FilesCtrl + Shift + 2
Select in FavoritesCtrl + Shift + 3
Move caret to match bracketCtrl + [
Next word matchCtrl + K
Previous word matchCtrl + Shift + K
Go backwardAlt + Left Arrow key
Go forwardAlt + Right Arrow key
Go to the last editCtrl + Q
Next marked occurrenceAlt + Up Arrow key
Previously marked occurrenceAlt + Down Arrow key
Search word at the insert pointCtrl + F3
Find next in the fileF3
Find the previous fileShift + F3
Find in fileCtrl + F
Replace in fileCtrl + H
Find usagesAlt + F7
Find in projectsCtrl + Shift + F
Replace in projectsCtrl + Shift + H
Find usages resultsAlt + Shift + U
Turn off search result highlightsAlt + Shift + H
RenameCtrl + R
Convert selection to uppercaseCtrl + U then U
Convert selection to lowercaseCtrl + U then L
Toggle case of selectionCtrl + U then S
Paste formattedCtrl + Shift + V
Show Clipboard HistoryCtrl + Shift + D
Jump to the quick search fieldCtrl + I

Debugging Shortcuts

ActionNetBeans Shortcuts
Start debugging the main projectCtrl + F5
Start debugging the current fileCtrl + Shift + F5
Start debugging test for fileCtrl + Shift + F6
Stop debugging sessionShift + F5
Continue debugging sessionF5
Run to the cursor location in the fileF4
Step intoF7
Step overF8
Step outCtrl + F7
Go to the calling methodCtrl + Alt + Down Arrow key
Evaluate expressionCtrl + F9
Toggle breakpointCtrl + F8
New breakpointCtrl + Shift + F8
New watchCtrl + Shift + F7

Coding in C or C++ Shortcuts

ActionNetBeans Shortcuts
Go to declarationAlt + Shift + C
Evaluate expressionCtrl + F9

Coding in JAVA Shortcuts

ActionNetBeans Shortcut keys
Generate codeAlt + Insert
Fix all class importsCtrl + Shift + I
Fix selected class’s importAlt + Shift + I
Format selectionAlt + Shift + F
Shift lines leftAlt + Shift + Left Arrow key
Shift lines rightAlt + Shift + Right Arrow key
Shift lines upAlt + Shift + Up Arrow key
Shift lines downAlt + Shift + Down Arrow key
Rectangular SelectionCtrl + Shift + R
Copy lines upCtrl + Shift + Up Arrow key
Copy lines downCtrl + Shift + Down Arrow key
Inspect membersCtrl
Inspect hierarchyAlt + F12
Add comment linesCtrl + Shift + C
Remove comment linesCtrl + /
Delete current lineCtrl + E

Testing, Running, and Compiling Shortcuts

ActionNetBeans Shortcuts
Compile package or fileF9
Build the main projectF11
Clean and build the main projectShift + F11
Set request parametersCtrl + Q
Create Unit testCtrl + Shift + U
Run a Unit test on fileCtrl + F6
Run Unit tests on the projectAlt + F6
Run the main projectF6
Run the main fileShift + F6

Opening & Toggling Shortcuts

ActionNetBeans Shortcut keys
Switch between open documents by order usedCtrl + Tab
Maximize windowShift + Esc
Close selected windowCtrl + W
Close all windowsCtrl + Shift + F4
Open contextual menuShift + F10
Reopen the recently closed fileCtrl + Alt + T
Toggle Inspect ModeCtrl + Shift + S

JAVA Editor Code templates Shortcuts

ActionNetBeans Shortcuts
public static void mainpsvm
EnumerationEn
ExceptionEx
public static finalPsf
public static final booleanPsfb
public static final intPsfi
public static final StringPsfs
StringSt
abstractab
assert trueas
breakbr
booleanbo
catchca
classcl
continuecn
doubledb
defaultdf
equaleq
extendsex
publicpu
privatepr
protectedpe
throwsth
finallyfy
implementsim
interfaceie
throwtw
importir
lengthle
System.out.println()sout
System.out.println(“obj”+obj)soutv
whilewh
volatilevo
instanceofiof
finalfi
floatfl
falsefa
shortsh
printStackTrace()pst
/**/bcom

JSP Editor Code Templates Shortcuts

ActionNetBeans Hotkeys
windows.alert()al
break;br
function${name}…fun
windows.historyhi
document.write()dw
${}equalseq
${}falsefa
${}windows.locationlo
${}returnre
$()windowWindow key
${}caseCatch()ca
catchcatch
windows.consoledebug()cond
windows.console.info()coni
windows.console.log()conl
windows.console.warn()conw
${}catchct
${}documentdo
${}instanceofiof

Other text editors can assist us in developing applications similar to NetBeans. Examples include Visual Studio Code and IntelliJ, both of which have their own set of shortcuts.

READ NEXT:

Back to top button