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