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 Action NetBeans Shortcuts Copy file path Alt + Shift + L Go to type Ctrl + O Go to file Alt + Shift + O Go to the Unit test Ctrl + Shift + T Go to Source Ctrl + Shift + B Go to declaration Ctrl + B Go to line Ctrl + G Toggle add or remove bookmark Ctrl + Shift + M Next bookmark Ctrl + Shift + . Previous bookmark Ctrl + Shift + , Next usage or compile error Ctrl + . Previous usage or compile error Ctrl + , Select next element Alt + Shift + . Select the previous element Alt + Shift + , Select in Projects Ctrl + Shift + 1 Select in Files Ctrl + Shift + 2 Select in Favorites Ctrl + Shift + 3 Move caret to match bracket Ctrl + [ Next word match Ctrl + K Previous word match Ctrl + Shift + K Go backward Alt + Left Arrow key Go forward Alt + Right Arrow key Go to the last edit Ctrl + Q Next marked occurrence Alt + Up Arrow key Previously marked occurrence Alt + Down Arrow key Search word at the insert point Ctrl + F3 Find next in the file F3 Find the previous file Shift + F3 Find in file Ctrl + F Replace in file Ctrl + H Find usages Alt + F7 Find in projects Ctrl + Shift + F Replace in projects Ctrl + Shift + H Find usages results Alt + Shift + U Turn off search result highlights Alt + Shift + H Rename Ctrl + R Convert selection to uppercase Ctrl + U then U Convert selection to lowercase Ctrl + U then L Toggle case of selection Ctrl + U then S Paste formatted Ctrl + Shift + V Show Clipboard History Ctrl + Shift + D Jump to the quick search field Ctrl + I
Debugging Shortcuts Action NetBeans Shortcuts Start debugging the main project Ctrl + F5 Start debugging the current file Ctrl + Shift + F5 Start debugging test for file Ctrl + Shift + F6 Stop debugging session Shift + F5 Continue debugging session F5 Run to the cursor location in the file F4 Step into F7 Step over F8 Step out Ctrl + F7 Go to the calling method Ctrl + Alt + Down Arrow key Evaluate expression Ctrl + F9 Toggle breakpoint Ctrl + F8 New breakpoint Ctrl + Shift + F8 New watch Ctrl + Shift + F7
Coding in C or C++ Shortcuts Action NetBeans Shortcuts Go to declaration Alt + Shift + C Evaluate expression Ctrl + F9
Coding in JAVA Shortcuts Action NetBeans Shortcut keys Generate code Alt + Insert Fix all class imports Ctrl + Shift + I Fix selected class’s import Alt + Shift + I Format selection Alt + Shift + F Shift lines left Alt + Shift + Left Arrow key Shift lines right Alt + Shift + Right Arrow key Shift lines up Alt + Shift + Up Arrow key Shift lines down Alt + Shift + Down Arrow key Rectangular Selection Ctrl + Shift + R Copy lines up Ctrl + Shift + Up Arrow key Copy lines down Ctrl + Shift + Down Arrow key Inspect members Ctrl Inspect hierarchy Alt + F12 Add comment lines Ctrl + Shift + C Remove comment lines Ctrl + / Delete current line Ctrl + E
Testing, Running, and Compiling Shortcuts Action NetBeans Shortcuts Compile package or file F9 Build the main project F11 Clean and build the main project Shift + F11 Set request parameters Ctrl + Q Create Unit test Ctrl + Shift + U Run a Unit test on file Ctrl + F6 Run Unit tests on the project Alt + F6 Run the main project F6 Run the main file Shift + F6
Opening & Toggling Shortcuts Action NetBeans Shortcut keys Switch between open documents by order used Ctrl + Tab Maximize window Shift + Esc Close selected window Ctrl + W Close all windows Ctrl + Shift + F4 Open contextual menu Shift + F10 Reopen the recently closed file Ctrl + Alt + T Toggle Inspect Mode Ctrl + Shift + S
JAVA Editor Code templates Shortcuts Action NetBeans Shortcuts public static void main psvm Enumeration En Exception Ex public static final Psf public static final boolean Psfb public static final int Psfi public static final String Psfs String St abstract ab assert true as break br boolean bo catch ca class cl continue cn double db default df equal eq extends ex public pu private pr protected pe throws th finally fy implements im interface ie throw tw import ir length le System.out.println() sout System.out.println(“obj”+obj) soutv while wh volatile vo instanceof iof final fi float fl false fa short sh printStackTrace() pst /**/ bcom
JSP Editor Code Templates Shortcuts Action NetBeans Hotkeys windows.alert() al break; br function${name}… fun windows.history hi document.write() dw ${}equals eq ${}false fa ${}windows.location lo ${}return re $()window Window key ${}caseCatch() ca catch catch windows.consoledebug() cond windows.console.info() coni windows.console.log() conl windows.console.warn() conw ${}catch ct ${}document do ${}instanceof iof
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: