Browse Source

Refratoring set Border to loweredbevel

main
Thoumi Ngonga Brice 2 years ago
parent
commit
1194d1212b
  1. 4
      src/main/java/BattleShip/AIGridGUI.java

4
src/main/java/BattleShip/AIGridGUI.java

@ -522,13 +522,13 @@ public class AIGridGUI extends JPanel {
BSButton bsb = buttons.get(cell.getGridLocation() + (i * columns)); BSButton bsb = buttons.get(cell.getGridLocation() + (i * columns));
//If mouse entered, highlight cells via lowered bevel. //If mouse entered, highlight cells via lowered bevel.
if(action == 1) { if(action == 1) {
bsb.setBorder(raisedbevel);
bsb.setBorder(loweredBevel);
} else { } else {
//If mouse released, place ship and color ship cells. //If mouse released, place ship and color ship cells.
if(action == 2) { if(action == 2) {
bsb.setCellContents(shipToPlace); bsb.setCellContents(shipToPlace);
bsb.setBackground(Color.blue); bsb.setBackground(Color.blue);
bsb.setBorder(raisedbevel);
bsb.setBorder(loweredBevel);
} else { } else {
//If mouse exited, unhighlight cells. //If mouse exited, unhighlight cells.
bsb.setBorder(compound); bsb.setBorder(compound);

Loading…
Cancel
Save