Robert Jaros
fun TabPanel.getComponentIndex(component: Component): Int { for (i in 0 until getSize()) { val test = getChildComponent(i) if (test == component) return i } return -1 }