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