| getSelectedIndex() | ใช้คืนค่า ตำแหน่ง ของ tab ที่ถูกเลือกอยู่ ใน Object JTabbedPane |
|---|
method:getSelectedIndex ();
return type:int
content:ใช้คืนค่า ตำแหน่ง ของ tab ที่ถูกเลือกอยู่ ใน Object JTabbedPane
example:JTabbedPane tab = new JTabbedPane ( JTabbedPane.RIGHT ); tab.addTab ( "DataEmployee", new JButton ( "TestTabEmployee" ) ); tab.addTab ( "DataPosition", new JButton ( "TestTabPosition" ) ); int current_tab = tab.getSelectedIndex ();