| setSelectedIndex() | ใช้กำหนด ว่าจะให้ tab ณ ตำแหน่งใดของ Object JTabbedPane ถูกเลือกอยู่ |
|---|
method:setSelectedIndex ( int_index );
return type:void
content:ใช้กำหนด ว่าจะให้ tab ณ ตำแหน่งใดของ Object JTabbedPane ถูกเลือกอยู่
example:JTabbedPane tab = new JTabbedPane ( JTabbedPane.RIGHT ); tab.addTab ( "DataEmployee", new JButton ( "TestTabEmployee" ) ); tab.addTab ( "DataPosition", new JButton ( "TestTabPosition" ) ); tab.setSelectedIndex ( 1 );