O'Reilly logo

NetBeans: The Definitive Guide by Jack J. Woehr, Vaughn Spurlin, Simeon Greene, Jesse Glick, Tim Boudreau

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Working with the Source Editor

Why Learn a New Editor?

Learning to use yet another source code editor was probably not high on your to-do list this year. However, the NetBeans syntax-coloring Source Editor, which is tightly integrated with the rest of the IDE, is easy to learn and is indispensible to your NetBeans development work flow.

The reason it is easy to learn the NetBeans Source Editor is that its behavior is unsurprising to anyone who has ever used a modern GUI text editor, especially one coded in Java. Try to guess what key sequences are required to copy, cut, and paste highlighted text? If you guessed Control-C, Control-X, and Control-V, respectively, you were right. Control-S saves your changes, if any exist. Shift-Right Arrow selects text to the right, Shift-Control-Right Arrow selects text to the right a word at a time. Et cetera...no surprises here.

The reason that the NetBeans Source Editor is indispensible to your NetBeans development work flow is the level of integration provided between objects in the NetBeans Explorer and Form Editor, code entities in your program, your actions within the editor, and the appearance of your code in the editor window.

Opening the Source Editor

There are two prinicipal ways to open a file in the NetBeans Source Editor:

  1. From the NetBeans Main Window, pull down File Open and use the file dialog to browse to the file you want to open.

  2. From within the NetBeans Explorer, find the node representing your source, right-click ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required