| addTab ( label, icon, component ) | ใช้เพิ่ม tab เข้าไปใน object JTabbedPane |
|---|
method:addTab ( label, icon, component );
return type:void
content:ใช้เพิ่ม tab เข้าไปใน object JTabbedPane โดยมีการกำหนด ป้ายชื่อของ tab และ icon ของ tab และ component ที่จะอยู่ภายใน tab ด้วย
example:ImageIcon icon = new ImageIcon ( "c:/bamboo.gif" ); JTabbedPane tab = new JTabbedPane ( JTabbedPane.RIGHT ); tab.addTab ( "DataEmployee", icon, new JButton ( "TestTab" ) );