Example usage for javax.swing JPanel getComponentCount

List of usage examples for javax.swing JPanel getComponentCount

Introduction

In this page you can find the example usage for javax.swing JPanel getComponentCount.

Prototype

public int getComponentCount() 

Source Link

Document

Gets the number of components in this panel.

Usage

From source file:org.ut.biolab.medsavant.client.view.component.KeyValuePairPanel.java

public JComponent getComponent(String key) {
    JPanel valuePanel = keyValueComponentMap.get(key);
    if (valuePanel.getComponentCount() > 0) {
        return (JComponent) valuePanel.getComponent(0);
    }/*w  w  w  .j a  v  a2  s  .c o m*/
    return null;
}

From source file:org.ut.biolab.medsavant.client.view.component.KeyValuePairPanel.java

public JComponent getAdditionalColumn(String key, int index) {
    JPanel p = keyExtraComponentsMap.get(key)[index];
    if (p.getComponentCount() > 0) {
        return (JComponent) p.getComponent(0);
    }//from  w  w w  .ja  v  a2 s  . c  o  m
    return null;
}