Home > Store

KEEGAN:NETBEANS IDE FIELD GUIDE _p2, 2nd Edition

Register your product to gain access to bonus material or receive a coupon.

KEEGAN:NETBEANS IDE FIELD GUIDE _p2, 2nd Edition

Book

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 2006
  • Dimensions: 7" x 9-1/4"
  • Pages: 592
  • Edition: 2nd
  • Book
  • ISBN-10: 0-13-239552-5
  • ISBN-13: 978-0-13-239552-6

The Only Complete Guide and Reference for NetBeans™ IDE 5.0

The award-winning NetBeans™ IDE eases all aspects of Java application development, incorporating a wide range of powerful features into one well-designed package. NetBeans IDE is consistently first in supporting the latest Java technologies for developing desktop, web, enterprise, and mobile applications.

NetBeans™ IDE Field Guide provides an introduction to the IDE and an extensive range of topics to help you with both everyday and advanced programming tasks, including
  • Taking advantage of the Ant-based project system to create easily deployable projects
  • Developing web applications with the built-in Apache Tomcat web server
  • Constructing, assembling, and verifying large-scale Java EE applications
  • Managing the Sun Java System Application Server through NetBeans IDE
  • Developing mobile applications with the NetBeans Mobility Pack
  • In this expanded second edition, you can also learn how to
  • Build powerful and attractive desktop applications with the Matisse GUI Builder
  • Profile your applications for performance issues
  • Develop modules for NetBeans IDE and rich-client applications based on the NetBeans Platform
  • Chat and share code with other developers using the NetBeans Collaboration Modules


Sample Content

Online Sample Chapter

Editing and Refactoring Code in NetBeans

Table of Contents

Foreword to the First Edition by James Gosling      xiii
Foreword to the First Edition by Bill Shannon      xv
Preface      xvii
About the Authors      xxv
Acknowledgments for the Second Edition      xxvii
Acknowledgments for the First Edition      xxix


Chapter 1: Download, Installation, and First Project      1

Downloading the IDE      2
Installing the IDE      3
Setting a Proxy      3
First NetBeans IDE Project      4

Chapter 2: NetBeans IDE Fundamentals      9

Creating a Project      10
Configuring the Classpath      12
Creating a Subproject      13
Creating and Editing Files      15
Setting Up and Modifying Java Packages      17
Compiling and Building      18
Viewing Project Metadata and Build Results      18
Navigating to the Source of Compilation Errors      19
Running      20
Creating and Running Tests      20
Debugging the Application      21
Integrating Version Control Commands      22
Managing IDE Windows      23

Chapter 3: IDE Project Fundamentals      25

Introduction to IDE Projects      26
Choosing the Right Project Template      28
Creating a Project from Scratch      29
Importing a Project Developed in a Different Environment      33
Navigating Your Projects      37
Working with Files Not in the Project      41
Creating Packages and Files in the Project      42
Configuring the Project's Classpath      44
Changing the Version of the JDK Your Project Is Based On      45
Changing the Target JDK for a Standard Project      46
Referencing JDK Documentation (Javadoc) from the Project      46
Adding Folders and JAR Files to the Classpath      47
Making External Sources and Javadoc Available in the IDE      47
Structuring Your Projects      48
Displaying and Hiding Projects      50
Compiling a Project      50
Running a Project in the IDE      55
Deploying a Java Project Outside of the IDE      57
Building a Project from Outside of the IDE      59
Customizing the IDE-Generated Build Script      60
Running a Specific Ant Target from the IDE      64
Completing Ant Expressions      64
Making a Menu Item or Shortcut for a Specific Ant Target      65

Chapter 4: Versioning Your Projects      69

Setting up CVS in NetBeans IDE      70
Checking Out Sources from a CVS Repository      71
Putting a Project into CVS      74
Keeping Track of Changes      76
Updating Files      80
Committing Changes      80
Ignoring Files in CVS Operations      81
Adding and Removing Files from a Repository      82
Working with Branches      82
Working with Patches      85
Working with Versioning Histories      87
Working with Other Version Control Systems      89

Chapter 5: Editing and Refactoring Code      91

Opening the Source Editor      92
Managing Automatic Insertion of Closing Characters      93
Displaying Line Numbers      94
Generating Code Snippets without Leaving the Keyboard      94
Using Code Completion      96
Inserting Snippets from Code Templates      100
Using Editor Hints to Generate Missing Code      108
Matching Other Words in a File      109
Generating Methods to Implement and Override      110
Generating JavaBeans Component Code      111
Creating and Using Macros      112
Creating and Customizing File Templates      113
Handling Imports      115
Displaying Javadoc Documentation While Editing      116
Formatting Code      116
Text Selection Shortcuts      120
Navigating within the Current Java File      120
Navigating from the Source Editor      124
Searching and Replacing      126
Deleting Code Safely      131
Changing a Method's Signature      135
Encapsulating a Field      136
Moving a Class to a Different Package      138
Moving Class Members to Other Classes      139
Creating a Method from Existing Statements      141
Creating an Interface from Existing Methods      142
Extracting a Superclass to Consolidate Common Methods      143
Changing References to Use a Supertype      145
Unnesting Classes      146
Tracking Notes to Yourself in Your Code      148
Comparing Differences Between Two Files      150
Splitting the Source Editor      151
Maximizing Space for the Source Editor      151
Changing Source Editor Keyboard Shortcuts      152

Chapter 6: Building Java Graphical User Interfaces      153

Using Different Layout Managers      156
Placing and Aligning a Component in a Form      157
Setting Component Size and Resizability      159
Setting Component Alignment      160
Specifying Component Behavior and Appearance      161
Generating Event Listening and Handling Methods      162
Customizing Generated Code      165
Previewing a Form      166
Using Custom Beans in the Form Editor      166
Deploying GUI Applications Developed with Matisse      167

Chapter 7: Debugging Java Applications      169

Starting a Debugging Session      171
Attaching the Debugger to a Running Application      175
Starting the Debugger Outside of the Project's Main Class      177
Stepping through Code      177
Setting Breakpoints      181
Managing Breakpoints      185
Customizing Breakpoint Behavior      186
Monitoring Variables and Expressions      189
Backing up from a Method to Its Call      192
Monitoring and Controlling Execution of Threads      192
Fixing Code During a Debugging Session      194
Viewing Multiple Debugger Windows Simultaneously      195

Chapter 8: Developing Web Applications      197

Representation of Web Applications in the IDE      199
Adding Files and Libraries to Your Web Application      203
Editing and Refactoring Web Application Files      208
Deploying a Web Application      214
Testing and Debugging Your Web Application      217
Creating and Deploying Applets      219
Changing the IDE's Default Web Browser      223
Monitoring HTTP Transactions      224

Chapter 9: Creating Web Applications on the JSF and Struts Frameworks      233

JSF Overview      234
Struts Overview      240

Chapter 10: Introduction to Java EE Development in NetBeans IDE      251

Configuring the IDE for Java EE Development      252
Java EE Server Support      255
Getting the Most from the Java BluePrints Solutions Catalog      257

Chapter 11: Extending Web Applications with Business Logic: Introducing Enterprise Beans      267

EJB Project Template Wizards      269
Adding Enterprise Beans, Files, and Libraries to Your EJB Module      272
Adding Business Logic to an Enterprise Bean      275
Adding a Simple Business Method      276
Enterprise Bean Deployment Descriptors      280

Chapter 12: Extending Java EE Applications with Web Services      283

Consuming Existing Web Services      284
IDE and Server Proxy Settings      291
Creating a WSDL File      292
Implementing a Web Service in a Web Application      292
Implementing Web Services within an EJB Module      300
Testing Web Services      301
Adding Message Handlers to a Web Service      304

Chapter 13: Developing Full-Scale Java EE Applications      311

Creating Entity Beans with the Top-Down Approach      313
Creating Entity Beans with the Bottom-Up Approach      321
Assembling Enterprise Applications      324
Importing Existing Enterprise Applications      328
Consuming Java Enterprise Resources      333
Java EE Platform and Security Management      341
Understanding the Java EE Application Server Runtime Environment      347
Ensuring Java EE Compliance      355
Refactoring Enterprise Beans      357
Database Support and Derby Integration      359

Chapter 14: Developing Java ME Mobile Applications      363

Downloading and Installing the Mobility Pack      364
Mobility Primer      364
Configuration vs. Configuration      366
Setting up Mobility Projects      366
Creating a Project from Scratch      366
Importing a Project      367
Physical Structure of Mobile Projects      369
Using Mobility File Templates      370
Configuring the Project's Classpath      372
Debugging Your Project      376
Configuring Your Project for Different Devices      377
Setting the Active Configuration for Your Project      379
Reusing Project Settings and Configurations      380
Structuring Project Dependencies      382
Managing the Distribution JAR File Content      383
Handling Project Resources for Different Configurations      384
Writing Code Specific to a List of Configurations      385
Using the Preprocessor      387
Using Configuration Abilities      397
Creating and Associating an Ability with a Configuration      398
Localizing Applications      400
Using the MIDP Visual Designer      402
Understanding the Flow Designer      405
Understanding the Screen Designer      413
Deploying Your Application Automatically      414
Incrementing the Application's MIDlet-Version Automatically      417
Using Ant in Mobility Projects      417
Using Headless Builds      421
Using the Wireless Connection Tools      422
Finding More Information      426

Chapter 15: Profiling Java Applications      427

Supported Platforms      428
Downloading and Installing the NetBeans Profiler      429
Starting a Profiling Session      429
The Profiler Control Panel      432
Monitoring an Application      435
Analyzing Performance      437
Analyzing Code Fragment Performance      442
Analyzing Memory Usage      443
Attaching the Profiler to a JVM      447

Chapter 16: Integrating Existing Ant Scripts with the IDE      449

Creating a Free-Form Project      451
Mapping a Target to an IDE Command      453
Setting up the Debug Project Command for a General Java Application      455
Setting up the Debug Project Command for a Web Application      457
Setting up Commands for Selected Files      462
Setting up the Compile File Command      463
Setting up the Run File Command      466
Setting up the Debug File Command      468
Setting up the Debugger's Apply Code Changes Command      470
Setting up the Profile Project Command for a General Java Application      471
Changing the Target JDK for a Free-Form Project      472
Making a Custom Menu Item for a Target      473
Debugging Ant Scripts      473

Chapter 17: Developing NetBeans Plug-in Modules      477

Plug-in Modules      478
Rich-Client Applications      478
Extending NetBeans IDE with Plug-in Modules      480
Setting up a Plug-in Module      481
Using the NetBeans APIs      486
Registering the Plug-in Module      496
Adding a License to a Plug-in Module      497
Building and Trying Out a Plug-in Module      499
Packaging and Distributing a Plug-in Module      500
Packaging and Distributing a Rich-Client Application      502
Finding Additional Information      504

Chapter 18: Using NetBeans Developer Collaboration Tools      507

Getting the NetBeans Developer Collaboration Tools      508
Configuring NetBeans IDE for Developer Collaboration      509
Creating a Collaboration Account      510
Managing Collaboration Accounts      514
Logging into a Collaboration Server      518
Collaborating and Interacting with Developers      519

Appendix A: Importing an Eclipse Project into NetBeans IDE       527

Getting the Eclipse Project Importer      528
Choosing Between Importing with and Importing without Project Dependencies      529
Importing an Eclipse Project and Preserving Project Dependencies      529
Importing an Eclipse Project and Ignoring Project Dependencies      532
Handling Eclipse Project Discrepancies      534
Handling Eclipse Project Reference Problems      534

Appendix B: Importing a JBuilder Project into NetBeans IDE       537

Getting the JBuilder Project Importer      538
Importing a JBuilder 2005 Project      538
Project Import Warnings      539
Running the Imported Project      540

Index      541

Foreword

Download the forewords from James Gosling and Bill Shannon

Index

Download the Index file related to this title.

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020