|
|
@ -1,5 +1,8 @@ |
|
|
|
package solitaer; |
|
|
|
|
|
|
|
import java.awt.Color; |
|
|
|
import java.awt.Graphics; |
|
|
|
|
|
|
|
public class WasteStack extends BaseStack { |
|
|
|
|
|
|
|
private static final long serialVersionUID = 1L; |
|
|
@ -17,5 +20,19 @@ public class WasteStack extends BaseStack { |
|
|
|
// TODO Auto-generated method stub |
|
|
|
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); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |