edu.uchsc.ccp.knowtator.ui
Class SwingUtils

java.lang.Object
  extended by edu.uchsc.ccp.knowtator.ui.SwingUtils

public class SwingUtils
extends Object

Class designed to contain various static utility functions that can be useful when creating a Java Swing application.

Author:
Brant Barney

Constructor Summary
SwingUtils()
           
 
Method Summary
static int indexOfComponent(Container container, Component comp)
          Gets the index of the component inside the given panel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingUtils

public SwingUtils()
Method Detail

indexOfComponent

public static int indexOfComponent(Container container,
                                   Component comp)
Gets the index of the component inside the given panel.

Parameters:
container - The container where the components is located
comp - The components to find the index of
Returns:
The index of the component in the given panel, or -1 if the component was not found in the panel or the panel contains no components.