|
|
@ -1,5 +1,8 @@ |
|
|
|
package solitaer; |
|
|
|
|
|
|
|
import java.awt.Color; |
|
|
|
import java.awt.Graphics; |
|
|
|
|
|
|
|
public class GeberStack extends BaseStack { |
|
|
|
|
|
|
|
private static final long serialVersionUID = 1L; |
|
|
@ -22,4 +25,20 @@ public class GeberStack extends BaseStack { |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
protected void paintComponent(Graphics g) { |
|
|
|
// TODO Auto-generated method stub |
|
|
|
super.paintComponent(g); |
|
|
|
if (stackIsEmpty()) { |
|
|
|
g.setColor(Color.pink); |
|
|
|
g.fillRect(0, 0, this.getWidth(), IMAGE_HIGHT); |
|
|
|
|
|
|
|
g.setColor(Color.black); |
|
|
|
g.drawRect(0, 0, this.getWidth() - 1, IMAGE_HIGHT - 1); |
|
|
|
|
|
|
|
String text = "Start\nAgain"; |
|
|
|
g.drawString(text, 5, this.IMAGE_HIGHT/2); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |