Thursday, 11 June 2015

How To Design GUI For Java Application Using NetBeans IDE




In this tutorial you will learn how to design GUI for java application.After this tutorial you will be able to create GUI container,add,resize and align components easily.

CREATING A NEW PROJECT IN NETBEANS:

To design a GUI for java application in netbeans first we need to create a new project following are the steps for creating new project.
  • Press cntrl+shift+N or select new project a new window will open like this then select java application.





  • After selecting java application new window will open like this then fill the project name as you want set the location of project uncheck the option for use dedicated libraries in last check the create main class option set the name of main class of your project as shown in this figure. 




  • After doing this step your created project will be added in the project window of netbeans but we want to create contacteditor to design our JFrame to do this right click on your project >>NEW>>JFrame Form after clicking on JFrameForm after this a new window will open like this then enter your contact editor class name and contact editor package name then press finish.










Before designing a gui you should know various windows of gui builder we should know about design area,palette, navigator and properties window in netbeans.

DESIGN AREA:

In Design area we can design our JFrame by picking java components from palette and dope them into design area we can change size and align components in design area.

PALETTE:

From Palette we can choose swing and awt components and put into our design area.

PROPERTIES WINDOW:

we can change properties of components that we have used in our design area to this first we need to select the component we need to change the properties then right click to select properties option.
  • After this you will see your design area will be created to design your gui just pick component and drop it into a design area.

Now you can design GUI for your java application using Netbeans IDE.


1 comment:

  1. I completely agree with you. I really like this article about java programming course . It contains a lot of useful information. I can set up my new idea from this post. It gives in depth information. Thanks for this valuable information for all

    ReplyDelete