Java Servlets Application Hosting Web Hosting, website hosting, web site hosting , web page hosting Apache, PHP, MySQL, PERL, servlets Java, JSP  Java Servlets Application Hosting Web Hosting website hosting, web site hosting, web page hosting Apache, PHP, MySQL, PERL, servlets Java, JSP,Python Java Servlets Application Hosting Web Hosting website hosting, web site hosting, web page hosting Apache, PHP, MySQL, PERL, servlets Java, JSP,Python Java Servlets Application Hosting Web Hosting website hosting, web site hosting, web page hosting Apache, PHP, MySQL, PERL, servlets Java, JSP,Python Java Servlets Application Hosting Web Hosting website hosting, web site hosting, web page hosting, Apache, PHP, MySQL, PERL, servlets Java, JSP,Python
Java Servlets Application Hosting Web Hosting, website hosting, web site hosting, web page hosting, Apache, PHP, MySQL, PERL, servlets Java, JSP, Python Java Servlets Application Hosting Web Hosting, website hosting, web site hosting, web page hosting, Apache, PHP, MySQL, PERL, servlets Java, Python,JSP
Java Servlets Application Hosting Web Hosting Sign-Up Java Servlets Application Hosting Fund Raising, Fundraising, web hosting, website hosting, web site hosting  Java Servlets Application Hosting Resellers web hosting, website hosting, web site hosting Java Servlets Application Hosting EZ Site Control Panel for web hosting,website hosting, web site hosting
Java Servlets Application Hosting Web Hosting, website hosting, web site hosting , web page hosting Apache, PHP, MySQL, PERL, servlets Java, Python,JSP,  Fundraising
  • The Change Horizontal Resizability command
The Change Vertical Resizability command
– Change Resizability enables you to set up vertical and horizontal resizing.
  • When the MyForm form opens in the GUI Builder's Design view, three additional windows appear, enabling you to navigate, organize, and edit GUI forms. These windows include the following:

    If you click the Source button, the IDE displays the application's Java source code in the editor. Sections of code that are automatically generated by the GUI Builder are indicated by blue areas. These blue areas are protected from editing in the Source view. You can only edit code appearing in the white areas of the editor when in Source view. When you make your changes in the Design View, the IDE updates the file's sources.

    Creating a Bean

    To create your own bean object and add it to the palette for the bean group, execute the following procedure:

    1. Select the <default package> node in the MyBean project.
    2. Choose New|Java Class from the pop-up menu.
    3. Specify the name for the new class, for example, MyBean, then press the Finish button.
    4. Expand the MyBean.java and MyBean node and select the Bean Patterns node.
    5. Right-click on the Bean Patterns node and choose Add|Property from the pop-up menu.
    6. Enter YourName in the PropertyName field as shown in the following figure, then press OK:
    7. Adding a new property

    8. Now you can analyze the automatically generated code. Notice that set and get methods were included:
    9. public class MyBean {
          
          /** Creates a new instance of MyBean */
          public MyBean() {
          }
      
          /**
           * Holds value of property yourName.
           */
          private String yourName;
      
          /**
           * Getter for property yourName.
           * @return Value of property yourName.
           */
          public String getYourName() {
              return this.yourName;
          }
      
          /**
           * Setter for property yourName.
           * @param yourName New value of property yourName.
           */
          public void setYourName(String yourName) {
              this.yourName = yourName;
          }
          
      }
      
    10. Right-click the MyBean node in the MyBean project tree and choose Tools |Add to Palette from the pop-up menu.
    11. Select the Beans group in the Palette tree to add your bean.

    Now you can switch to the Palette window by choosing Palette from the Windows menu and make sure that the MyBean component was added to the Beans group.

    So far you have created a bean, set the YourName property, and added this bean as a component to the palette.

    Adding Components to the Form

    Now you can use the Free Design of the GUI Builder and add the MyBean component and other standard Swing components to MyForm.
    1. Select the MyForm node in the project tree.
    2. Drag the JLabel Swing component from the Palette window to the Design Area. Double-click the component and change the text property to "Enter your name:".
    3. Drag the JTextField component from the Palette window to the Design Area. Double-click the component and empty the text field.
    4. Drag the JButton component from the Palette window to the Design Area. Double-click the component and enter "OK" as the text property.
    5. Add another button and enter "Cancel" as its text property.
    6. Align components by using the appropriate align commands.
    7. Before you drag the MyBean component from the Pallete you must compile your project because the MyBean component is non-visual and cannot be operated as a visual component. When you Drag and Drop the MyBean component it will not appear in the Design Area. However, you can view it in the Inspector window by expanding the Other Components node, as shown in the following figure.
    8. Adding a new bean

    To summarize, in the previous steps you created a project, developed a JFrame form, added a bean object and included it in your project as a non-visual component. Later in this trail you will learn how to change properties for the bean component and handle events by using the NetBeans GUI Builder.
    Previous page: Previous Lesson
    Next page: Writing a Simple Bean
    Java Servlets Application Hosting Fund Raising, Fundraising, web hosting, website hosting, web site hosting
    WWW.

    Call Us Toll-Free
    (877) 256-0328

    Outside USA
    1 - (201) 505-0430

    Java Servlets Application Hosting Welcome Java Servlets Application Hosting Web Hosting Plans Overview , Fund Raising, Fundraising, web hosting, website hosting, web site hosting Java Servlets Application Hosting Fund Raising, Fundraising, web hosting Java Servlets Application Hosting Resellers, web Hosting Java Servlets Application Hosting Web Design, web Hosting Java Servlets Application Hosting Extra Services,  web Hosting Java Servlets Application Hosting Traffic Booster, web hosting Java Servlets Application Hosting Traffic Booster, web hosting Java Servlets Application Hosting Technical Support,  web Hosting Java Servlets Application Hosting webmaster tips,  web Hosting Java Servlets Application Hosting 30 Day Money Back, web hosting Java Servlets Application Hosting Legal Notices for Web Hosting Java Servlets Application Hosting Glossary Computer Terms for web Hosting Java Servlets Application Hosting Contact Information - web hosting

    Site Map
    Java Servlets Application Hosting Web Hosting, website hosting, web site hosting , web page hosting Apache, PHP, MySQL, PERL, servlets Java, Python, JSP Java Servlets Application Hosting Java Servlets Application Hosting Java Servlets Application Hosting Java Servlets Application Hosting Java Servlets Application Hosting Lesson: Using the NetBeans GUI Builder (The Java™ Tutorials > JavaBeans(TM))
    Trail: JavaBeans(TM)
    Lesson: Using the NetBeans GUI Builder

    This lesson explains how to use the NetBeans IDE GUI Builder to work with beans. In preparation for working with the GUI Builder, you should be first familiar with the key NetBeans concepts which are explained in the Using NetBeans IDE Guide .

    This lesson guides you through the process of creating a bean pattern in the NetBeans projects, introduces the user interface of the GUI Builder, and explains how to add your bean object to the palette.

    Creating a New Project

    In the NetBeans IDE, you always work in a project where you store sources and files. To create a new project, perform the following steps:

    1. Select New Project from the File menu. You can also click the New Project button in the IDE toolbar.
    2. In the Categories pane, select the General node. In the Projects pane, choose the Java Application type. Click the Next button.
    3. Enter MyBean in the Project Name field and specify the project location. Do not create a Main class here, because later you will create a new Java class in this project.
    4. Click the Finish button.

    This figure represents the expanded MyBean node in the Projects list.

    This figure represents the expanded MyBean node in the Projects list

    Creating a New Form

    After creating a new project, the next step is to create a form within which the JavaBeans components and other required GUI components, will be placed.

    To create a new form, perform the following sequence of actions:

    1. In the Projects list, expand the MyBean node, right-click on the <default package> node and choose New|JFrame Form from the pop-up menu.
    2. Enter MyForm as the Class Name.
    3. Click the Finish button.
    The IDE creates the MyForm form and the MyForm class within the MyBean application and opens the MyForm form in the GUI Builder.

    This figure represents the Projects list, where the MyForm class is located.

    This figure represents the Projects list, where the  MyForm class is

    The GUI Builder Interface

    When the JFrame form is added to your application, the IDE opens the newly-created form in an Editor tab with a toolbar containing the following buttons::

    • The Selection Mode button
– Selection Mode enables you to select one or more objects in the Design Area.
    • The Connection Mode command
– Connection Mode enables you to set a connection between objects by specifying an event.
    • The Preview Design command
– Preview Design enables you to preview the form layout.
    • The Align Left in Column command
The Align Right in Column command
The Align Up in Row command
The Align Down in Row command
– Align commands enable you to align selected objects.
     
     
     

    Add to My Yahoo!

    XML icon

    Add to Google

     

     

     

     

     

     

     

     

     

     

     

    JSP Servlets Tomcat mysql Java JSP Servlets Tomcat mysql Java JSP Servlets Tomcat mysql Java JSP Servlets Tomcat mysql Java JSP at JSP.aldenWEBhosting.com Servlets at servlets.aldenWEBhosting.com Tomcat at Tomcat.aldenWEBhosting.com mysql at mysql.aldenWEBhosting.com Java at Java.aldenWEBhosting.com Web Hosts Portal Web Links Web Links Web Hosting JSP Solutions Web Links JSP Solutions Web Hosting Servlets Solutions Web Links Servlets Solutions Web Hosting Web Links Web Links . . .
    .
    .
    . .
    .
    . .
    . . . . . . . . . . . jsp hosting servlets hosting web hosting web sites designed cheap web hosting web site hosting myspace web hosting