Instant NetBeans IDE How-to [Instant] — Save 50%
Develop different Java applications such as desktop, web, enterprise, and mobile applications using NetBeans IDE with this book and ebook.
A free and open-source Integrated Development Environment (IDE) for software developers. In this article by Atul Palandurkar, author of Instant NetBeans IDE How-to, you get all the tools you need to create professional applications with the Java platform such as follows :
- Desktop applications,
- Enterprise applications,
- Web applications, and
- Mobile applications,
(For more resources related to this topic, see here.)
“NetBeans” basically stands for “Network JavaBeans”. The journey of NetBeans started in 1996. NetBeans started as a final year student project and group of seven students started coding in C++ later they switched on to Java 1.0.2 towards framing NetBeans. Initially it was named as “Xelfi” (meaning Delphi for UNIX).
After completing their studies, they started selling it on the internet for approximately $20 USD as the Shareware and got successful. In 1997, Roman Stanek who was a Czech entrepreneur founded NetBeans and started selling Xelfi with the name of NetBeans IDE now. Later on during Java One in 1998, NetBeans was presented in front of Java Community and Sun Microsystems acquired NetBeans.
Jaroslav Tulach (alias Yarda Tulach) is one of the founders of NetBeans is now working with Oracle to improve NetBeans IDE and to make it more and more powerful but performance driven IDE for specially for different kind of Java application development, it is his and his teams efforts that NetBeans is the most powerful IDE for Java application development and people are able to create, run, deploy Java applications so easily.
I don’t understand that how people say that Java has so many restrictions, it is not easy to develop Java applications, don’t have drag-drop features for GUI based Java applications. People who still says such things, I personally feel that they are still leaving in stone-age. NetBeans gives you everything you require to design, develop, run and deploy any Java application. One can develop any Java application as we have already mentioned above and it gives you visual designer for Java Desktop applications, Web applications, Mobile applications, etc.
Layout of NetBeans IDE :
Launch the NetBeans IDE and create a DemoProject i.e. simple java application to understand detailed layout of the IDE. Here is the snapshot of NetBeans IDE 7.2.
Use steps here to get following output :
- Launch NetBeans IDE
- Create a simple java project as we have studied before named “DemoProject” with a Main.java which will help you to understand the layout in detail.
- It will open IDE with different child windows as shown in below figure.
Layout of NetBeans
As shown in figure above, Layout of NetBeans is divided into different small windows as follows:
- Project Window: Open projects and source code will be listed here in different tab for each source file.
- Editor Window: In Editor Window, Source tab allows you to write, generate code and business logics as per the suggestions provided by NetBeans IDE. Whereas Design tab allows you to design windows, forms, panels, dialogs, etc. with the visual designer feature provided by Design tab in NetBeans. Design tab also allows you to customize the menus and components added to the Editor area and Design tab has a great feature of drag and drop.
- Properties Window: Allows you to display and customize the properties of components selected in Design tab.
- Palette Window: List and display the windows, dialogs, menu bar, tool bar, components, etc. available for respective technology and to drag and drop.
- Navigator Window: Displays the hierarchical structure for all the components like class, functions or methods, objects, variables, text field, label, etc. i.e. visual and non-visual components.
- Output Window: Displays the output and other messages from the NetBeans, also displays logs, etc.
Every child window in NetBeans IDE is designed with purpose which helps developers to reduce the amount of time required for development, their efforts, chances of errors, bugs, etc.The Properties Window, Palette Window and Output Window are hidden by default and are not visible by default.
- To open Properties Window : Go to Window | Properties or use shortcut Ctrl + Shift + 7
- To open Palette Window : Go to Window | Palette or use shortcut Ctrl + Shift + 8
- To open Output Window : Go to Window | Output | Output or use shortcut Ctrl + 4
UI Builder in NetBeans IDE
The UI Builder is further divided into three main tabs:
- Design Tab : The Design tab provides Editor area where you get visual view of the components where you can add components directly from palette; place, align, resize components.
- Source Tab :The Source tab allows you to see the source code you have written and generated after the use of Design tab.
- History Tab :The History tab provides the details about the changes made in the file.
Here we have created a blank java application, created package and then we have added a JFrame form which provides Editor Area as shown in fig. above.
UI Builder in NetBeans IDE allows you to drag and drop components you need from categories specified in Palette to the Canvas and design the UI as per requirements.
Before we start designing projects, we will have a look at some design related concepts and some tips which may help you in designing great applications using NetBeans IDE.
- Free Form Design : With the Editor area in design tab, you can go on adding components freely and place the components here and there wherever you feel.
- Placement of Components : Since the Editor area allows you to add components the place you need, it also provides hints, using these hints you can automatically place components. And the code will be generated automatically.
- Visual Help : Design tab visually helps you a lot by providing hints, anchors, insets, offsets, fills, etc. with which you can design professional UIs very easily.
- Shortcuts to NetBeans : Even if you are new to NetBeans, you can design and develop applications like a professional or an expert by using the various shortcuts available in NetBeans IDE.
For shortcuts, Go to Help | Keyboard Shortcuts Card. It will open PDF file containing shortcuts applicable to respective version of the NetBeans IDE. The file will contain the various shortcuts related to coding, debugging, compiling, testing, running, navigating through the source code, etc.
Helps you understand the layout of NetBeans IDE and how easily we can design projects in NetBeans IDE.
Resources for Article:
- Getting Started with NetBeans [Article]
- NetBeans IDE 7: Building an EJB Application [Article]
- iReport in NetBeans [Article]
About the Author :
Atul Palandurkar is a Java and Android trainer currently working as director with Sharda Infotech, a Nagpur-based IT industry. Atul is an Oracle Certified NetBeans Platform Associate. He is very passionate about the latest technologies like Java and NetBeans.
Atul has also worked with the HCL Career Development Centre (Unit of HCL), C-DAC, Seed Infotech, ADCC Academy, among other companies as corporate trainer and has been in training for approximately 6 years and has similar experience in software development. He has also worked with NetBeans as a community contributor for the NetCAT program. In his heart Atul is a designer and has won a number contests such as the National Web Design Contest, Logo Design Contest, National Android Apps Development Championship, and was awarded Outstanding Programmer. He has conducted various seminars and workshops on Java, Android, and more of the latest technologies.
He has written various tutorials and has blogged about various technologies too. He loves to code, design, and convert innovative ideas into running applications. Atul always uses NetBeans IDE to develop and design Java applications; he also uses NetBeans for training Java technologies.