TS 72 visualdevelopment

Visual Development Test Specification

Author: Adam Senk
Version: 7.2
Last update:2012/03/30
Introduction: This is intended as tests of Form Editor module.
Comments:

Contents


Test suite: Add AWT and Swing components together

Purpose:
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g MyJFrame).

  1. Add JLabel and Label into JFrame
    1. Create new JFrame.
    2. Select component JLabel from Component Palette category Swing.
    3. Click into Form Designer.
    4. Select component Label from Component Palette category AWT.
    5. Click into Form Designer.
    • EXPECTED RESULT: Code for added JLabel and Label is generated.
  2. Add JPanel and Canvas into Frame
    1. Create new Frame.
    2. Select component JPanel from Component Palette category Swing.
    3. Click into Form Designer.
    4. Select component Canvas from Component Palette category AWT.
    5. Click into Form Designer.
    • EXPECTED RESULT: Code for added JPanel and Canvas is generated.


Test suite: Test moving and resizing components in Form Designer

Purpose: Test posibility for move and resize components in Form Designer.
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g MyJFrame).

  1. Move components in one container
    1. Add three buttons to MyForm, Right-click the JForm in the Navigator.
    2. Set Layout to FlowLayout and change order of components.
    3. Set Layout to BorderLayout and change direction for components.
    4. Set Layout to GridLayout and change order of components, change number of columns and rows to 2 and repeat test.
    5. Set Layout to GridBagLayout and try change position - it is without success.
    6. Set Layout to CardLayout and try change position - it is without success.
    7. Set Layout to BoxLayout and change order of components. Change Axis to Y Axis and repeat.
    8. Set Layout to AbsoluteLayout and change position for components.
    9. Set Layout to NullLayout and change position for components.
    10. For every layout try select two components and change position for both components.
    • EXPECTED RESULT: Properly generated code.
  2. Move components in more containers
    1. Add three JPanels to form, JPanel1, JPanel2, JPanel3.
    2. Remove JPanel2 to JPanel3.
    3. Add at least two buttons to all containers (including JForm).
    4. Move components from one container to another container, try all posibilities.
    5. Select two components from one container and move them.
    6. Select two components from different containers and move them to another container, to the same container - this is possible only in Navigator.
    7. Remove all container with components into other container.
    • EXPECTED RESULT: Properly generated code.
  3. Resize components
    1. Add components to form.
    2. Try set all Layout (except AbsoluteLayout and NullLayout) and try resize components - without success.
    3. Set AbsoluteLayout.
    4. Resize components and check generate code - for size is used AbsoluteConstraints method.
    • EXPECTED RESULT: Code is generated with AbsoluteConstraints method.
  4. Set the same width size for more components
    1. Create new JFrame
    2. Invoke contextual menu on JFrame in design
    3. Choose action Add From Palette -> Swing Controls -> JButton
    4. Do it again
    5. Change text of jButton1 to "OK"
    6. Change text of jButton2 to "Cancel"
    7. Select both buttons by mouse with keeping ctrl key
    8. Invoke contextual menu in design and choose action Same Size -> Same Width
    • EXPECTED RESULT: The width of buttons should be the same and have to be marked with special mark showing vertical size connectivity.
  5. Set the same height size for more components
    1. Create new JFrame
    2. Invoke contextual menu on JFrame in design
    3. Choose action Add From Palette -> Swing Controls -> JButton
    4. Do it again
    5. Change font size of text on jButton1 to e.g. 24 px
    6. Select both buttons by mouse with keeping ctrl key
    7. Invoke contextual menu in design and choose action Same Size -> Same Height
    • EXPECTED RESULT: The height of buttons should be the same and have to be marked with special mark showing horizontal size connectivity.


Test suite: Add components to containers - Swing

Purpose:
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g MyJFrame).

  1. Add JTextArea into JPanel
    1. Create new JFrame.
    2. Select component JPanel from Component Palette category Swing Containers.
    3. Select component jPanel1 in Form Designer.
    4. Invoke popup menu and push Add From Palette -> Swing Controls -> Text Area.
    • EXPECTED RESULT: jPanel1 is present in Component Navigator Tree as Container (parent node). Code for added JTextArea inside JPanel is generated.
  2. Add JPanel into JTabbedPane
    1. Create new JFrame.
    2. Select component JTabbedPane from Component Palette category Swing Containers.
    3. Select component jTabbedPane1 in Form Designer.
    4. Invoke popup menu and push Add From Palette -> Swing Containers -> Panel.
    • EXPECTED RESULT: jTabbedPane1 is present in Component Navigator Tree as Container (parent node). Code for added JPanel inside JTabbedPane is generated.
  3. Add JTable into JScrollPane
    1. Create new JFrame.
    2. Select component JScrollPane from Component Palette category Swing Containers.
    3. Select component jScrollPane1 in Form Designer.
    4. Invoke popup menu and push Add From Palette -> Swing Controls -> Table.
    • EXPECTED RESULT: jScrollPane1 is present in Component Navigator Tree as Container (parent node). Code for added JTable inside JScrollPane is generated.
  4. Add JPanel into JSplitPane
    1. Create new JFrame.
    2. Select component JSplitPane from Component Palette category Swing Containers.
    3. Select component jSplitPane1 in Form Designer.
    4. Invoke popup menu and push Add From Palette -> Swing Control -> Button.
    5. Select component jSplitPane1 in Form Designer.
    6. Invoke popup menu and push Add From Palette -> Swing Container -> Panel.
    • EXPECTED RESULT: jSplitPane1 is present in Component Navigator Tree as Container (parent node). Code for added JButton and JPanel inside JSplitPane is generated.
  5. Add JToggleButton into JToolBar
    1. Create new JFrame.
    2. Select component JToolBar from Component Palette category Swing Containers.
    3. Select component JjoolBar1 in Form Designer.
    4. Invoke popup menu and push Add From Palette -> Swing Controls -> ToggleButton.
    • EXPECTED RESULT: jToolBar1 is present in Component Navigator Tree as Container (parent node). Code for added JToggleButton inside JToolBar is generated.
  6. Add JTree into JInternalFrame
    1. Create new JFrame.
    2. Select component JInternalFrame from Component Palette category Swing Containers.
    3. Select component jInternalFrame1 in Form Designer.
    4. Invoke popup menu and push Add From Palette -> Swing Controls -> Tree.
    • EXPECTED RESULT: jInternalFrame1 is present in Component Navigator Tree as Container (parent node). Code for added JTree inside JInternalFrame is generated.
  7. Add JInternalFrame into JDesktopPane
    1. Create new JFrame.
    2. Select component JDesktopPane from Component Palette category Swing Containers.
    3. Select component jDesktopPane1 in Form Designer.
    4. Invoke popup menu and push Add From Palette -> Swing Containers -> JInternalFrame.
    • EXPECTED RESULT: jDesktopPane1 is present in Component Navigator Tree as Container (parent node). Code for added JInternalFrame inside JDesktopPane is generated.


Test suite: Add components to containers - AWT

Purpose:
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g MyJFrame).

  1. Add TextArea into ScrollPane
    1. Create new Frame.
    2. Select component ScrollPane from Component Palette category AWT.
    3. Select component scrollPane1 in Form Designer.
    4. Invoke popup menu and push Add From Palette -> AWT -> TextArea.
    • EXPECTED RESULT: scrollPane1 is present in Component Navigator Tree as Container (parent node). Code for added TextArea inside ScrollPane is generated.
  2. Add Canvas into Panel
    1. Create new Frame.
    2. Select component Panel from Component Palette category AWT.
    3. Select component panel1 in Form Designer.
    4. Invoke popup menu and push Add From Palette -> AWT -> Canvas.
    • EXPECTED RESULT: scrollPane1 is present in Component Navigator Tree as Container (parent node). Code for added Canvas inside Panel is generated.


Test suite: In-place editing

Purpose:
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g MyJFrame).

  1. In-place editing on JLabel
    1. Create new JFrame.
    2. Select component JLabel from Component Palette category Swing.
    3. Select component jLabel1 in Form Designer.
    4. Press SPACE.
    5. Type "My Text" into shown in-place editor (textfield).
    • EXPECTED RESULT: Generated code: jLabel1.setText("My Text");
  2. In-place editing on JButton
    1. Create new JFrame.
    2. Select component JButton from Component Palette category Swing Controls.
    3. Select component jButton1 in Form Designer.
    4. Press SPACE.
    5. Type "My Text" into shown in-place editor (textfield).
    • EXPECTED RESULT: Generated code: jButton1.setText("My Text");
  3. In-place editing on JToggleButton
    1. Create new JFrame.
    2. Select component JToggleButton from Component Palette category Swing.
    3. Select component jToggleButton1 in Form Designer.
    4. Press SPACE.
    5. Type "My Text" into shown in-place editor (textfield).
    • EXPECTED RESULT: Generated code: jToggleButton1.setText("My Text");
  4. In-place editing on JCheckBox
    1. Create new JFrame.
    2. Select component JCheckBox from Component Palette category Swing.
    3. Select component jCheckBox1 in Form Designer.
    4. Press SPACE.
    5. Type "My Text" into shown in-place editor (textfield).
    • EXPECTED RESULT: Generated code: jCheckBox1.setText("My Text");
  5. In-place editing on JRadioButton
    1. Create new JFrame.
    2. Select component JRadioButton from Component Palette category Swing.
    3. Select component jRadioButton1 in Form Designer.
    4. Press SPACE.
    5. Type "My Text" into shown in-place editor (textfield).
    • EXPECTED RESULT: Generated code: jRadioButton1.setText("My Text");
  6. In-place editing on JMenu
    1. Create new JFrame.
    2. Select component JMenuBar from Component Palette category Swing.
    3. Select component jMenu1 in Form Designer.
    4. Press SPACE.
    5. Type "My Text" into shown in-place editor (textfield).
    • EXPECTED RESULT: Generated code: jMenu1.setText("My Text");


Test suite: Gaps in Free Design

Purpose: Since version 7.2 GUI Builder supports vizualization and direct editing of gaps in free design
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g MyJFrame). Add some Swing components.

  1. Gap vizulazition -all gaps
    1. Open MyJFrame in design view.
    2. In navigator select [JFrame].
    • EXPECTED RESULT: All gaps between all compontes are vizualited
  1. Gap vizulazition -single component
    1. The MyJFrame is still open in design view.
    2. Select single Swing component.
    • EXPECTED RESULT: Only gaps between this and all neighboring components are vizualited.
  1. Gap editing
    1. Select some gap
    2. The gap is highlighted by green color.
    3. Drag and drop some edge of this gap to change the gap's size
    4. Use mouse wheel to chage the gap's size
    • EXPECTED RESULT: The size of selected gap is changed properly. The position of all componets, or the size of other gaps is changed accordingly.
  1. Gap vizulazition - options panel
    1. Invoke Tools -> Options from main menu.
    2. Select category - Java.
    3. Select tab GUI Builder.
    4. Uncheck "Visualize Additional Layout Information".
    5. Press OK button
    • EXPECTED RESULT: Vizualization of gaps in MyJFrame disappears


Test suite: Layout tests

Purpose:
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new JDialog (e.g MyJDialog).

  1. Add FlowLayout to JDialog
    1. Create new JDialog and select it in Designer.
    2. Right-click JDialog in Navigator window
    3. Select "Set Layout > Flow Layout"
    • EXPECTED RESULT: Code for new layout is generated, appropriate icon appears in the Navigator view.
  2. Add BorderLayout to JDialog
    1. Create new JDialog (if not created yet) and select it in Designer.
    2. Add JButton into the JDialog
    3. Right-click JDialog in Navigator window
    4. Select "Set Layout > Border Layout"
    • EXPECTED RESULT: Code for new layout is generated, appropriate icon appears in the Navigator view.
      Note: BorderLayout code is not generated unless a component is added.
  3. Add GridLayout to JDialog
    1. Create new JDialog (if not created yet) and select it in Designer.
    2. Right-click JDialog in Navigator window
    3. Select "Set Layout > Grid Layout"
    • EXPECTED RESULT: Code for new layout is generated, appropriate icon appears in the Navigator view.
  4. Add GridBagLayout to JFrame
    1. Create new JFrame and select it in Designer.
    2. Right-click JFrame in Navigator window
    3. Select "Set Layout > Grid Bag Layout"
    • EXPECTED RESULT: Code for new layout is generated, appropriate icon appears in the Navigator view.
  5. Add CardLayout to JFrame
    1. Create new JFrame (if not created yet) and select it in Designer.
    2. Right-click JFrame in Navigator window
    3. Select "Set Layout > Card Layout"
    • EXPECTED RESULT: Code for new layout is generated, appropriate icon appears in the Navigator view.
  6. Add BoxLayout to JInternalFrame
    1. Create new JInternalFrame and select it in Designer.
    2. Right-click JInternalFrame in Navigator window
    3. Select "Set Layout > Box Layout"
    • EXPECTED RESULT: Code for new layout is generated, appropriate icon appears in the Navigator view.
  7. Add AbsoluteLayout to Frame (AWT)
    1. Create new Frame and select it in Designer.
    2. Right-click Frame in Navigator window
    3. Select "Set Layout > Absolute Layout"
    • EXPECTED RESULT: Code for new layout is generated, appropriate icon appears in the Navigator view.
  8. Add Null Layout to Dialog
    1. Create new JInternalFrame and select it in Designer.
    2. Right-click JInternalFrame in Navigator window
    3. Select "Set Layout > Null Layout"
    • EXPECTED RESULT: Code for new layout is generated, appropriate icon appears in the Navigator view.
  9. Set layout for Panel - FlowLayout
    1. Create new Frame.
    2. Select component Panel from Component Palette category Swing Containers.
    3. Click into Form Designer.
    4. Select JPanel in Component Navigator and invoke popup menu.
    5. Push Set Layout > FlowLayout from popup menu.
    • EXPECTED RESULT: No code is changed in jPanel1 (FlowLayout is default).
  10. Set layout for Panel - BorderLayout
    1. Create new Frame (if it is not done yet).
    2. Select component Panel from Component Palette category Swing.
    3. Click into Form Designer.
    4. Select jPanel1 in Component Navigator and invoke popup menu.
    5. Push Set Layout | BorderLayout from popup menu.
    • EXPECTED RESULT: Layout node under jPanel1 node is changed (shown BorderLayout). Code for new layout is generated.
  11. Set layout for Panel - GridLayout
    1. Create new Frame.
    2. Select component Panel from Component Palette category Swing.
    3. Click into Form Designer.
    4. Select jPanel1 in Component Navigator and invoke popup menu.
    5. Push Set Layout | GridLayout from popup menu.
    • EXPECTED RESULT: Layout node under jPanel1 node is changed (shown GridLayout). Code for new layout is generated.
  12. Set layout for Panel - GridBagLayout
    1. Create new Frame.
    2. Select component Panel from Component Palette category Swing.
    3. Click into Form Designer.
    4. Select jPanel1 in Component Navigator and invoke popup menu.
    5. Push Set Layout | GridBagLayout from popup menu.
    • EXPECTED RESULT: Layout node under jPanel1 node is changed (shown GridBagLayout). Code for new layout is generated.
  13. Set layout for JPanel - CardLayout
    1. Create new JFrame.
    2. Select component Panel from Component Palette category Swing.
    3. Click into Form Designer.
    4. Select jPanel1 in Component Navigator and invoke popup menu.
    5. Push Set Layout | CardLayout from popup menu.
    • EXPECTED RESULT: Layout node under jPanel1 node is changed (shown CardLayout). Code for new layout is generated.
  14. Set layout for JPanel - BoxLayout
    1. Create new JFrame.
    2. Select component Panel from Component Palette category Swing.
    3. Click into Form Designer.
    4. Select jPanel1 in Component Navigator and invoke popup menu.
    5. Push Set Layout | BoxLayout from popup menu.
    • EXPECTED RESULT: Layout node under jPanel1 node is changed (shown BoxLayout). Code for new layout is generated.
  15. Set layout for JPanel - AbsoluteLayout
    1. Create new JFrame.
    2. Select component Panel from Component Palette category Swing.
    3. Click into Form Designer.
    4. Select jPanel1 in Component Navigator and invoke popup menu.
    5. Push Set Layout | AbsoluteLayout from popup menu.
    • EXPECTED RESULT: Layout node under jPanel1 node is changed (shown AbsoluteLayout). Code for new layout is generated.
  16. Set layout for JPanel - Null Layout
    1. Create new JFrame.
    2. Select component Panel from Component Palette category Swing.
    3. Click into Form Designer.
    4. Select jPanel1 in Component Navigator and invoke popup menu.
    5. Push Set Layout | Null Layout from popup menu.
    • EXPECTED RESULT: Layout node under jPanel1 node is changed (shown NullLayout). Code for new layout is generated.
  17. Change layout: FlowLayout to AbsoluteLayout
    1. Create new JFrame.
    2. Select JFrame in Component Navigator and invoke popup menu.
    3. Push Set Layout | AbsoluteLayout from popup menu.
    • EXPECTED RESULT: Layout node under JFrame node is changed (shown AbsoluteLayout). Code for new layout is generated.
  18. Change layout: GridLayout to Null Layout
    1. Create new JFrame.
    2. Select JFrame in Component Navigator and invoke popup menu.
    3. Push Set Layout | Null Layout from popup menu.
    • EXPECTED RESULT: Layout node under JFrame node is changed (shown NullLayout). Code for new layout is generated.
  19. Change layout: GridBagLayout to AbsoluteLayout
    1. Create new JFrame.
    2. Select JFrame in Component Navigator and invoke popup menu.
    3. Push Set Layout | AbsoluteLayout from popup menu.
    • EXPECTED RESULT: Layout node under JFrame node is changed (shown AbsoluteLayout). Code for new layout is generated.
  20. Change layout: GridBagLayout to Null Layout
    1. Create new JFrame.
    2. Select JFrame in Component Navigator and invoke popup menu.
    3. Push Set Layout | Null Layout from popup menu.
    • EXPECTED RESULT: Layout node under JFrame node is changed (shown NullLayout). Code for new layout is generated.
  21. Change layout: CardLayout to Null Layout
    1. Create new JFrame.
    2. Select JFrame in Component Navigator and invoke popup menu.
    3. Push Set Layout | Null Layout from popup menu.
    • EXPECTED RESULT: Layout node under JFrame node is changed (shown NullLayout). Code for new layout is generated.
  22. Change layout: Null Layout to AbsoluteLayout
    1. Create new JFrame.
    2. Select JFrame in Component Navigator and invoke popup menu.
    3. Push Set Layout | AbsoluteLayout from popup menu.
    • EXPECTED RESULT: Layout node under JFrame node is changed (shown AbsoluteLayout). Code for new layout is generated.
  23. Change layout: AbsoluteLayout to Null Layout
    1. Create new JFrame.
    2. Select JFrame in Component Navigator and invoke popup menu.
    3. Push Set Layout | Null Layout from popup menu.
    • EXPECTED RESULT: Layout node under JFrame node is changed (shown NullLayout). Code for new layout is generated.


Test suite: Border tests

Purpose:
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g MyJFrame).

  1. Set EmptyBorder for JButton
    1. Open existing form file from mounted filesystem..
    2. Select component JButton from Component Palette category Swing.
    3. Click into Form Designer.
    4. Set border-property to EmptyBorder.
    5. Click on jButton1 in Form Designer.
    • EXPECTED RESULT: Code for new border is generated:
      > jButton1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
  2. Set LineBorder for JLabel
    1. Open existing form file from mounted filesystem..
    2. Select component JLabel from Component Palette category Swing Controls.
    3. Click into Form Designer.
    4. Set border-property to LineBorder.
    5. Click on jLabel1 in Form Designer.
    • EXPECTED RESULT: Code for new border is generated (depends on parameters you set):
      > jLabel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); // or...
      jLabel1.setBorder(new javax.swing.border.LineBorder(java.awt.Color(0, 0, 0), 1, false));
  3. Set MatteBorder for JRadioButton
    1. Open existing form file from mounted filesystem..
    2. Select component JRadioButton from Component Palette category Swing Controls.
    3. Click into Form Designer.
    4. Set border-property to MateBorder.
    5. Click on jRadioButton1 in Form Designer.
    • EXPECTED RESULT: Code for new border is generated:
      > jRadioButton1.setBorder(new javax.swing.border.MatteBorder(null));
  4. Set TitledBorder for JPanel
    1. Open existing form file from mounted filesystem..
    2. Select component JPanel from Component Palette category Swing Containers.
    3. Click into Form Designer.
    4. Set border-property to TitledBorder.
    5. Click on jPanel1 in Form Designer.
    • EXPECTED RESULT: Code for new border is generated:
      > jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
  5. Set EtchedBorder for JTextField
    1. Open existing form file from mounted filesystem..
    2. Select component JTextField from Component Palette category Swing Controls.
    3. Click into Form Designer.
    4. Set border-property to EtchedBorder.
    5. Click on jTextField1 in Form Designer.
    • EXPECTED RESULT: Code for new border is generated:
      > jTextField1.setBorder(new javax.swing.border.EtchedBorder()); or jTextField1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
  6. Set BevelBorder for JTextArea
    1. Open existing form file from mounted filesystem..
    2. Select component JTextArea from Component Palette category Swing Controls.
    3. Click into Form Designer.
    4. Set border-property to BevelBorder.
    5. Click on jTextArea1 in Form Designer.
    • EXPECTED RESULT: Code for new border is generated:
      > jTextArea1.setBorder(new javax.swing.border.BevelBorder(javax.swing.border.BevelBorder.RAISED));
  7. Set SoftBevelBorder for JCheckBox
    1. Open existing form file from mounted filesystem..
    2. Select component JCheckBox from Component Palette category Swing Controls.
    3. Click into Form Designer.
    4. Set border-property to SoftBevelBorder.
    5. Click on jCheckBox1 in Form Designer.
    • EXPECTED RESULT: Code for new border is generated:
      > jCheckBox1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
  8. Set CompoundBorder for JSplitPane
    1. Open existing form file from mounted filesystem..
    2. Select component JSplitPane from Component Palette category Swing Containers.
    3. Click into Form Designer.
    4. Set border-property to CompoundBorder.
    5. Click on jSplitPane1 in Form Designer.
    • EXPECTED RESULT: Code for new border is generated:
      > jSplitPane1.setBorder(new javax.swing.border.CompoundBorder()); or jSplitPane.setBorder(javax.swing.BorderFactory.createCompoundBorder());


Test suite: Action tests

Purpose:
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g MyJFrame).

  1. Invoke Design This Container on Panel
    1. Open existing form file from mounted filesystem.
    2. Select component Panel from Component Palette category AWT.
    3. Click into Form Designer.
    4. Select panel1 in Form Designer and invoke popup menu.
    5. Push Design This Container.
    • EXPECTED RESULT: Form Designer displays only panel1 as the whole design container. Title of Form Designer is changed to "/Panel1".
  2. Invoke Design This Container on JPanel
    1. Open existing form file from mounted filesystem.
    2. Select component JPanel from Component Palette category Swing Conainers.
    3. Click into Form Designer.
    4. Select jPanel1 in Form Designer and invoke popup menu.
    5. Push Design This Container.
    • EXPECTED RESULT: Form Designer displays only jPanel1 as the whole design container. Title of Form Designer is changed to "/jPanel1".
  3. Invoke Design This Container on JDialog (from Other Components)
    1. Open existing form file from mounted filesystem.
    2. Select component JDialog from Component Palette category Swing Windows.
    3. Click into Form Designer.
    4. Select jDialog1 in Component Navigator and invoke popup menu.
    5. Push Design This Container.
    • EXPECTED RESULT: Form Designer displays only jDialog1 as the whole design container. Title of Form Designer is changed to "/jDialog1".
  4. Invoke Design Top Container on JScrollPane
    1. Open existing form file from mounted filesystem.
    2. Select component JScrollPane from Component Palette category Swing Containers.
    3. Click into Form Designer.
    4. Select jScrollPane1 in Component Navigator and doubleclick.
    5. Push Design This Container.
    • EXPECTED RESULT: Form Designer displays top container as the whole design container. Title of Form Designer is changed to "/jScrollPane1".
  5. Invoke Design Parent Container
    1. Create new JFrame and insert JPanel
    2. Place JButton into jPanel1
    3. Select jButton1 in design and invoke contextual menu
    4. Choose action Design Parent -> jPanel1
    • EXPECTED RESULT: Form Designer displays jPanel1 container as the whole design container. Title of Form Designer is changed to "/jPanel1".
  6. Invoke Design Parent Container
    1. Have opened JFrame from previous test case
    2. Do double click on jPanel1 node in Navigator
    3. Select jButton1 node in Navigator and invoke contextual menu
    4. Choose action Design Parent -> Top Parent
    • EXPECTED RESULT: Action "Design Parent -> jPanel1" should be disabled. Form Designer displays JFrame container as the whole design container. Title of Form Designer is changed to "NewJFrame.java".
  7. Invoke Code Customizer on JButton
    1. Open existing form file from mounted filesystem.
    2. Select component JButton from Component Palette category Swing Controls.
    3. Click into Form Designer.
    4. Select jButton1 in Form Designer and invoke popup menu.
    5. Push Customize Code
    • EXPECTED RESULT: Code Customizer become active.
  8. Change order of tabs in JTabbedPane
    1. Open existing form file with three tabs(button1,button2 and button3).
    2. Select jTabbedPane1 in Form Designer and invoke popup menu.
    3. Push Change Order.
    4. In opened Change Order dialog select button1 and push Move Down.
    5. Select button3 and push Move Up.
    • EXPECTED RESULT: Order of components under jTabbedPane1 node in Component Navigator is changed, appropriate code is regenerated and Form Designer is repainted.
  9. Add JPopupMenu by Add From Palette (doesn't work, see enh. 120173)
    1. Open existing form file from mounted filesystem.
    2. Invoke popup menu in Form Designer.
    3. Push Add From Palette -> Swing Menus -> Popup Menu.
    • EXPECTED RESULT: Code for added JPopupMenu is generated. jPopupMenu1 is selected in Component Navigator and appropriate properties are displayed in Properties Sheet under Component Tree.
  10. Add Button by Add From Palette on Panel
    1. Open existing form file from mounted filesystem.
    2. Select component Panel from Component Palette category AWT.
    3. Click into Form Designer.
    4. Invoke popup menu on panel1 in Form Designer.
    5. Push Add From Palette -> AWT -> Button.
    • EXPECTED RESULT: Code for added Button is generated. button1 is selected in Component Navigator and appropriate properties are displayed in Properties Sheet under Component Tree.
  11. Alignment of components in design
    1. Create new JFrame and insert two components into it - JButton and JTextArea
    2. Arrange this components in way that jButton1 is under jTextArea1
    3. Select both components in design and invoke contextual menu
    4. Choose action Align -> Left to Column
    • EXPECTED RESULT: jButton1 should be moved and aligned to left edge of jTextArea1
  12. Alignment of components in design
    1. Have JFrame from previous test case
    2. Select both components in design and invoke contextual menu
    3. Choose action Align -> Right to Column
    • EXPECTED RESULT: jButton1 should be moved and aligned to right edge of jTextArea1
  13. Alignment of components in design
    1. Have JFrame from previous test case
    2. Select both components in design and invoke contextual menu
    3. Choose action Align -> Center to Column
    • EXPECTED RESULT: jButton1 should be moved and aligned to the center of bottom edge of jTextArea1
  14. Alignment of components in design
    1. Have JFrame from previous test case
    2. Move jButton1 next to jTextArea1 to it's right side
    3. Choose action Align -> Top to Row
    • EXPECTED RESULT: jButton1 should be moved and aligned to upper edge of jTextArea1
  15. Alignment of components in design
    1. Have JFrame from previous test case
    2. Move jButton1 next to jTextArea1 to it's right side
    3. Choose action Align -> Botton to Row
    • EXPECTED RESULT: jButton1 should be moved and aligned to botton edge of jTextArea1
  16. Alignment of components in design
    1. Have JFrame from previous test case
    2. Move jButton1 next to jTextArea1 to it's right side
    3. Choose action Align -> Center to Row
    • EXPECTED RESULT: jButton1 should be moved and aligned to the middle of right vertical edge of jTextArea1


Test suite: Performance

Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g MyJFrame).

  1. Performance - copy
    1. Add two JPanels (jPanel1, jPanel2) into the form.
    2. Add 10 JButons into jPanel1.
    3. Select all JButtons.
    4. Copy components to jPanel2.
    • EXPECTED RESULT: Copying of components is performed in one stroke.
  2. Performance - undo/redo
    1. Add JPanel1,JPanel2 into form.
    2. Add 10 JButtons into JPanel1.
    3. Select all JButtons.
    4. Move components to JPanel2.
    5. Copy components to JPanel1.
    6. Push undo, undo, redo, redo.
    • EXPECTED RESULT: Undo and redo is always performed in one stroke.
  3. Performance - move
    1. Add JPanel1,JPanel2 into form.
    2. Add 10 JButoons into JPanel1.
    3. Select all JButtons.
    4. Move components to JPanel2.
    • EXPECTED RESULT: Move of components is performed in one stroke.
  4. Performance - delete
    1. Add 10 JButoons into form.
    2. Select all JButtons.
    3. Delete components.
    • EXPECTED RESULT: Delete of components is performed in one stroke.
  5. Performance - cut and paste
    1. Add JPanel1,JPanel2 into form.
    2. Add 10 JButoons into JPanel1.
    3. Select all JButtons.
    4. Cut components and paste them into JPanel2.
    • EXPECTED RESULT: Move of components is performed in one stroke.
  6. Performance - change properties
    1. Add 10 JButoons into form.
    2. Select all JButtons.
    3. Change properies: background, text, size.
    • EXPECTED RESULT: Changing of properties is performed in one stroke.


Test suite: Undo/Redo

Purpose: Test undo/redo functionality.
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g MyJFrame).

  1. Undo/redo - test of components
    1. Layout - Change Layout to AbsoluteLayout.
    2. Add - Add two JPanels, add several JButtons and other components to JPanel1,JPanel2,top container.
    3. Layout - Change Layout in JPanel1 to GridBagLayout.
    4. Resize, move - resize and move JPanel1, JPanel2.
    5. Move - move JButtons from one Panel to second Panel and vice versa.
    6. Copy - copy JButtons between Panels and top container.
    7. Delete - delete JButton.
    8. Cut and paste - cut and paste components from one JPanel to second.
    9. Change properties - change properties (Background Color, text).
    10. Events - add events.
    11. Make changes via ComponentNavigator (move, change order, delete, copy).
    12. Undo - undo all changes.
    13. Redo - redo all changes.
    14. Undo/redo - undo and redo all changes
    • EXPECTED RESULT: Undo and redo all changes perform correctly.
  2. Undo/redo - work with two FormEditors
    1. Create JForm1, JForm2.
    2. Add JButton to JForm1.
    3. Cut and paste JButton to JForm2.
    4. Push undo in JForm1.
    • EXPECTED RESULT: JButton is in both forms.
  3. Undo/redo - events
    1. Add JButton.
    2. Add event actionPerformed.
    3. Type in editor code.
    4. Push undo and redo.
    • EXPECTED RESULT: Typed text is in editor.


Test suite: Visualization of Button Group

Purpose: To test if buttons in a scope of Button Group are correctly visualized
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g MyJFrame).

  1. Visualization of jCheckBoxes
    1. Place e.g. 3 jCheckBoxes in Frame
    2. Place component jButtonGroup
    3. Select all jCheckBoxes in Frame
    4. Go to Properties and choose the name of jButtonGroup from combo to ButtonGroup property
    • EXPECTED RESULT: All jCheckBoxes should be connected with line
  2. Moving of controls which are the members of one jButtonGroup
    1. use previous testcase and try to move all jCheckBoxes in a scope of Frame
    • EXPECTED RESULT: Visualization should not disappear
  3. Visualization of jRadioButtons
    1. Place e.g. 3 jRadioButtons in Frame
    2. Place component jButtonGroup
    3. Select all jRadioButtonsin Frame
    4. Go to Properties and choose the name of jButtonGroup from combo to ButtonGroup property
    • EXPECTED RESULT: All jRadioButtons should be connected with line
  4. Test Controls in a scope of jButtonGroup in different containers
    1. Create new Frame and place there two jPanels
    2. Place jRadioButton in each jPanel
    3. Place jButtonGroup
    4. Assign jRadioButtons to one jButtonGroup
    5. Do double click on one of the Panels
    • EXPECTED RESULT: After double click, jPanel should be opened in design and no exception is thrown
  5. Test various alignment of controls towards each other when they are in jButtonGroup
    1. Create new Frame
    2. Place 2 jRadioButtons into Frame
    3. Place jButtonGroup
    4. Assign jRadioButtons to one jButtonGroup
    5. Select both controls and test all Alignment Tools from the top of Designer Image:AlignmentTools_TS_61_visualdevelopment.png
    • EXPECTED RESULT: After double click, jPanel should be opened in design and no exception is thrown


Test suite: Usability

Purpose: Test of several features for better usability.
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g MyJFrame).

  1. Multi-selection, interval multi selection
    1. Add several components to form.
    2. Try multi-selection (Ctrl + Mouse).
    3. Try interval selection (Shift + Mouse).
    • EXPECTED RESULT: Components are selected properly.
  2. Multi-selection, interval multi selection
    1. Add JPanel1, add two components to form, add two components to JPanel1.
    2. Change Layout to AbsoluteLayout.
    3. Try to select a region (Shift + drag mouse) with some component on form and with JPanel.
    4. Try to select a region without component on form and with componets in JPanel.
    • EXPECTED RESULT: Components are selected properly - always are selected components in the correct container.
  3. Precise resizing of form size
    1. Create new form.
    2. Double-click on right (or bottom) border of form.
    3. In window "Set Form Designer Size" enter new size.
    • EXPECTED RESULT: Form is resized, the same value is in property sheet - tab Code Generation.


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