method:setVisible ( boolean );return type:voidcontent:ใช้กำหนดว่าจะให้ component แสดงหรือไม่example:JButton button = new JButton ( "cancel" ); button.setVisible ( true );