Sometimes navigating through all the files in a project can be a bit cumbersome,
especially if we know the name of the file we want to open but we are not sure of its
location. Luckily, NetBeans provides the Shift+Alt+O keyboard shortcut that allows
us to quickly open any file in our project.
Additional useful keyboard shortcuts include Shift+Alt+F ; this shortcut quickly
formats our code. Ctrl+E erases the current line, much faster than highlighting the
line and hitting backspace. Sometimes we import a class into our code and later
decide not to use it, some of us delete the lines where the class is used but forget to
delete the import line at the top of the source file. NetBeans will generate a warning
about the unused import, hitting Ctrl+Shift+I will delete all unused imports in one
One last thing worth mentioning, even though it is not strictly a keyboard shortcut, a
very useful feature of the NetBeans editor is that left-clicking on a method or variable
while pressing Ctrl will turn the method or variable into a hyperlink, and NetBeans
will navigate to the method or variable declaration.
Understanding NetBeans Visual Cues
In addition to offering keyboard shortcuts, code templates, and code completion,
NetBeans offers a number of visual cues that allow us to better understand our code
at a glance. Some of the most useful are illustrated in the next screenshot.