public void testCardLayoutShow() throws Exception {
   JComponent rootComponent =
       getInstrumentedRootComponent("TestCardLayoutShow.form", "BindingTest");
   assertTrue(rootComponent.getLayout() instanceof CardLayout);
   assertEquals(rootComponent.getComponentCount(), 2);
   assertFalse(rootComponent.getComponent(0).isVisible());
   assertTrue(rootComponent.getComponent(1).isVisible());
 }
 public void testIntProperty() throws Exception {
   JComponent rootComponent = getInstrumentedRootComponent("TestIntProperty.form", "BindingTest");
   assertEquals(1, rootComponent.getComponentCount());
   JTextField textField = (JTextField) rootComponent.getComponent(0);
   assertEquals(37, textField.getColumns());
   assertEquals(false, textField.isEnabled());
 }
    protected void clear(JComponent comp) {
      int nCompCount = comp.getComponentCount();
      ArrayList aListComps = new ArrayList();

      for (int i = 0; i < comp.getComponentCount(); i++) {
        Component compChild = comp.getComponent(i);
        if (compChild instanceof JComponent) {
          JComponent jcomp = (JComponent) compChild;
          if (jcomp instanceof JCheckBox || jcomp instanceof JTextField) aListComps.add(comp);
          else clear(jcomp);
        }
      }
      clear(aListComps);
    }
 public void testClientProp() throws Exception { // IDEA-46372
   JComponent rootComponent = getInstrumentedRootComponent("TestClientProp.form", "BindingTest");
   assertEquals(1, rootComponent.getComponentCount());
   JTable table = (JTable) rootComponent.getComponent(0);
   assertSame(Boolean.TRUE, table.getClientProperty("terminateEditOnFocusLost"));
 }
 public void testStringProperty() throws Exception {
   JComponent rootComponent =
       getInstrumentedRootComponent("TestGridConstraints.form", "BindingTest");
   JButton btn = (JButton) rootComponent.getComponent(0);
   assertEquals("MyTestButton", btn.getText());
 }