getSelectedIndex « JTabbedPane « Java Swing Q&A





1. JTabbedPane.getSelectedIndex    coderanch.com

Hi, I have an applet with several of my own beans on it. One of them is a panel with a JTabbedPane on it, with four tabs. I want to know, from another bean, which of those tabs is currently selected. My actual line of code is : int index = topLevelApplet.theResultsPanel.ResultsTabs.getSelectedIndex(); but index always has the value 0, no matter ...