TS 71 WindowWizard

Window Wizard Test Specification for NetBeans 7.1

Author: Atul Palandurkar
NetBeans Version: 7.1
Last update: 09/10/2011
Introduction: The Window Wizard is introduced in NetBeans 7.1, this will help to design form & top components with the help of GUI designer.


Test suite: Creating the Module project

Purpose: How to create NetBeans Platform Module Project?
Setup: Start NetBeans IDE with clear userdir

  1. New Module Project
    1. Go to File > New Project or use shortcut Ctrl+Shift+N. Under Categories, select NetBeans Modules. Under Projects, select Module. Click Next.
    2. In the Name and Location panel, type "DemoWizard" in the Project Name field. You can change the Project Location to any directory on your computer. If it has not been set, select the Standalone Module option. Click Next.
    3. In the Basic Module Configuration panel, type "org.demo.wizard" in Code Name Base.
    4. Leave everything else unselected and click Finish.
    • EXPECTED RESULT: The IDE creates the DemoWizard project. The project contains all of your sources and project metadata, such as the project's Ant build script. The project opens in the IDE. You can view its logical structure in the Projects window and its file structure in the Files window.

Test suite: Creating Top Component Window

Purpose: How to create Top Component Window?
Setup: Module Project created.

  1. Create Top Component Window
    1. In the Projects window, right-click the DemoWizard project node, choose New > Window.
    2. In the Basic Setting panel, select the Window Position as "explorer". If it has not been selected, select Open on Application Start. | Click Next.
    3. In the Name, Icon & Location panel, type "Demo" in the Class Name Prefix text box and select the main package from the Package drop-down list. | Click Finish.
      In the Projects window, you should now see this:
      In Design Tab, you should now see this:

Test suite: Adding various components

Purpose: How to add various components to Top Component Window?
Setup: Top Component window is created.

  1. "Add Panel"
    1. Select component Panel from component palette category Swing Containers.
    2. Click into UI Designer in Left-Top Corner:
    3. Resize the JPanel to make room for the components we'll place within it a little later & change border as Titled Border with the help of Properties window & name it as Jpanel.
    • EXPECTED RESULT: Code for added JPanel is generated properly.
  2. Add Components
    1. Add various components such as Label, TextField, Password Field, Radio Buttons, Text Area, Buttons, Toggle Button, Progress Bar, etc. from Palette as per requirements. Such as:
    • EXPECTED RESULT: Code for added Components is generated.

Test suite: Moving and Resizing Components in Design mode

Purpose: How to move & resize the added components?
Setup: Various components added already.

  1. Moving Components
    1. Set Layout to FlowLayout and change order of components.
    2. Set Layout to BorderLayout and change direction for components.
    3. Set Layout to GridLayout and change order of components, change number of columns and rows to 2 and repeat test.
    4. Set Layout to GridBagLayout and try change position - it is without success.
    5. Set Layout to CardLayout and try change position - it is without success.
    6. Set Layout to BoxLayout and change order of components. Change Axis to Y Axis and repeat.
    7. Set Layout to AbsoluteLayout and change position for components.
    8. Change Grid X, Grid Y, Apply Grid to Position in options (Options, Editing, Form Editor Settings) and change position of components with new properties.
    9. Set Layout to NullLayout and change position for components.
    10. For every layout try select any two components and change position for both components and repeat.
    • EXPECTED RESULT: Proper code is generated.
  2. Resizing Components
    1. Select any two buttons by mouse keeping Ctrl key down.
    2. Invoke contextual menu in design and choose action Same Size > Same Width or Same Size > Same Height.
    • EXPECTED RESULT: The width or height of buttons should be the same and have to be marked with special mark showing vertical size connectivity.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo