Book Details

About This Book

Increase developer productivity using features like refactoring and code creation

Test applications effectively using JUnit, TestNG and Arquilian

A recipe based guide filled with practical examples to help you create robust applications using NetBeans

Who This Book Is For

If you’re a Java developer of any level using NetBeans and want to learn how to get the most out of NetBeans, then this book is for you. Learning how to utilize NetBeans will provide a firm foundation for your Java application development.

Table of Contents

Chapter 1: Using NetBeans Projects

Introduction

Creating a Java application

Creating a Maven application

Using Maven projects

Creating a Free-Form application

Creating a library

Importing an Eclipse project

Chapter 2: Java Development with NetBeans

Introduction

Creating a package

Creating a class

Creating an interface

Running a file

Debugging a class

Formatting the code

Collapsing and expanding code folds

Toggling comments

Fixing and organizing imports

Creating file headers

Changing the look and feel of NetBeans

Chapter 3: NetBeans Productivity

Introduction

Creating a constructor

Creating a logger

Creating a toString() method

Creating a property

Overriding a method

Rename refactoring

Move refactoring

Copy refactoring

Delete refactoring

Change parameters refactoring

Pull up / push down refactoring

Extract interface refactoring

Encapsulate fields refactoring

Replacing a constructor with the Factory pattern

Chapter 4: Developing Desktop Applications with NetBeans

Introduction

Creating a Swing application

Adding components to a form

Creating menus

Creating dialogs

Creating toolbars

Responding to events

Building a distributable application from NetBeans

Chapter 5: NetBeans Enterprise Application Development

Introduction

Adding WildFly support to NetBeans

Adding TomEE support to NetBeans

Creating a web application

Creating a web application with JSF support

Adding JSF support to a web application

Creating a JSF composite component

Creating an EJB

Creating a Message Driven EJB

Creating a timer

Creating a REST web service

Using the Chrome Connector

Chapter 6: Managing Databases with NetBeans

Introduction

Connecting to Java DB

Registering and managing a MySQL Server

Connecting to Microsoft SQL Server and Oracle

Connecting to PostgreSQL

Managing a SQL database

Connecting to MongoDB

Chapter 7: NetBeans JavaFX

Introduction

Creating a JavaFX application

Graphical editing of FXML files

Styling a JavaFX application with CSS

Creating and using a JavaFX custom control

Deploying a self-contained application

Chapter 8: NetBeans Mobile Development

Introduction

Adding mobile support to NetBeans

Creating an MIDP application

Adding Android support to NetBeans

Creating an Android application

Chapter 9: Version Control

Introduction

Initializing a Git repository

Cloning a Git repository

Checking out from a Subversion repository

Getting the history of a file

Committing and pushing code changes

Creating a Diff patch

Branching a repository

Chapter 10: NetBeans Testing and Profiling

Introduction

Installing JUnit support into NetBeans

Creating a JUnit test for an existing class

Creating a JUnit test

Creating a JUnit test suite

Running tests

Creating a TestNG unit test

Profiling an application

Chapter 11: Using External Web Services

Introduction

Getting a list of Delicious bookmarks

Adding a Delicious bookmark

Getting a list of recent photos on Flickr

Geocoding with Google Maps

Verifying an e-mail address with StrikeIron

Adding an additional web service into NetBeans

Chapter 12: Extending NetBeans

Introduction

Creating a NetBeans module

Packaging a NetBeans module for deployment

What You Will Learn

Develop a variety of application types using different libraries with Ant, Maven, and NetBeans

Version-control your applications with a variety of different providers

Use the latest testing and profiling tools

Extend NetBeans with an array of new features

In Detail

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.

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.

Authors

David Salter

David Salter is an enterprise software developer and architect who has been developing software professionally since 1991. His relationship with Java goes back to the beginning, when Java 1.0 was used to write desktop applications and applets for interactive websites. David has been developing enterprise Java applications using both Java EE (and J2EE) and open source solutions since 2001. David wrote the books NetBeans IDE 8 Cookbook and Seam 2.x Web Development, both by Packt Publishing. He also co-authored the book Building SOA-Based Composite Application Using NetBeans IDE 6, Packt Publishing.

Rhawi Dantas

Rhawi Dantas is a software engineer from Recife, Brazil, with several years of Java development expertise, focused mainly on server-side development. He has a Bachelor's degree in Information Systems and is currently doing his Masters in Software Systems from Tampere University of Technology. He is also certified as SCJP, SCWCD, and SCSNI.

Alerts & Offers

Series & Level

We understand your time is important. Uniquely amongst the major publishers, we seek to develop and publish the broadest range of learning and information products on each technology. Every Packt product delivers a specific learning pathway, broadly defined by the Series type. This structured approach enables you to select the pathway which best suits your knowledge level, learning style and task objectives.

Learning

As a new user, these step-by-step tutorial guides will give you all the practical skills necessary to become competent and efficient.

Beginner's Guide

Friendly, informal tutorials that provide a practical introduction using examples, activities, and challenges.

Essentials

Fast paced, concentrated introductions showing the quickest way to put the tool to work in the real world.

Cookbook

A collection of practical self-contained recipes that all users of the technology will find useful for building more powerful and reliable systems.

Blueprints

Guides you through the most common types of project you'll encounter, giving you end-to-end guidance on how to build your specific solution quickly and reliably.

Mastering

Take your skills to the next level with advanced tutorials that will give you confidence to master the tool's most powerful features.

Starting

Accessible to readers adopting the topic, these titles get you into the tool or technology so that you can become an effective user.

Progressing

Building on core skills you already have, these titles share solutions and expertise so you become a highly productive power user.