Book Image

NetBeans IDE 8 Cookbook

By : David Salter, Rhawi Dantas
Book Image

NetBeans IDE 8 Cookbook

By: David Salter, Rhawi Dantas

Overview of this book

<p>From the start to the end of a Java project's lifecycle, this book will show you how to perform many key tasks with the NetBeans IDE, uncovering more about mobile, desktop, and enterprise Java along the way.</p> <p>You will start by creating Java projects and learning how to refactor and use NetBeans tools to increase developer efficiency. You will then get a walkthrough of how to create a desktop application before covering JavaFX and mobile applications and how to use external services within them. Having seen how to create many different types of applications, you will then be shown how to test and profile them before storing them in revision control systems such as Git or Subversion. Finally, you will learn how to extend NetBeans itself by adding new features to the IDE.</p>
Table of Contents (19 chapters)
NetBeans IDE 8 Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a class


One of the most repetitive tasks in software development is creating classes. Once again, with NetBeans wizards, creation of classes is very easy and straightforward.

Getting ready

It is necessary to have a project in order to create a class; so, if you are unsure on how to do this, please check the recipes in Chapter 1, Using NetBeans Projects. To help follow this recipe, when creating a project, enter CreatingClasses as the project name. When creating the project, ensure the Create Main Class option is not selected.

How to do it…

When the Projects explorer shows the CreatingClasses project, expand the CreatingClasses node if not yet expanded and perform the following steps:

  1. Right-click on the CreatingClasses project, and select New and Java Class….

  2. On the New Java Class window, type Recipe under the Class Name field.

  3. On the Package selection, enter com.davidsalter.cookbook.creatingclasses.

  4. Click on Finish.

We can see the New Java Class window in the following screenshot:

How it...