| setRowSelectionAllowed() | ใช้กำหนดว่าเป็นการเลือกทั้งแถว ใช่หรือไม่ ( ถ้าไม่ใช่จะเลือกเป็น cell ) |
|---|
method:setRowSelectionAllowed ( boolean );
return type:void
content:ใช้กำหนดว่าเป็นการเลือกทั้งแถว ใช่หรือไม่ ( ถ้าไม่ใช่จะเลือกเป็น cell )
example:String [][] value = { { "apple", "red" }, { "orange", "orange" }, { "grape", "green" } }; String [] column = { "fruit", "color" }; JTable table = new JTable ( value, column ); table.setRowSelectionAllowed ( true );