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