Browse Source

Add render for WasteStack

feature_solitaer_Geber-_WasteStack
Alexander Hartung 3 years ago
parent
commit
698569ba07
  1. 17
      src/main/java/solitaer/WasteStack.java

17
src/main/java/solitaer/WasteStack.java

@ -1,5 +1,8 @@
package solitaer; package solitaer;
import java.awt.Color;
import java.awt.Graphics;
public class WasteStack extends BaseStack { public class WasteStack extends BaseStack {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -18,4 +21,18 @@ public class WasteStack extends BaseStack {
return false; return false;
} }
@Override
protected void paintComponent(Graphics g) {
// TODO Auto-generated method stub
super.paintComponent(g);
if (stackIsEmpty()) {
g.setColor(Color.lightGray);
g.fillRect(0, 0, this.getWidth(), IMAGE_HIGHT);
g.setColor(Color.black);
g.drawRect(0, 0, this.getWidth() - 1, IMAGE_HIGHT - 1);
}
}
} }
Loading…
Cancel
Save