}
@Override
+ public void setSize(int width, int height)
+ {
+ // TODO Auto-generated method stub
+ super.setSize(width, height);
+ }
+
+ @Override
public void paintComponent(Graphics g)
{
if (restart)
}
else if (lastMiniMe != null)
{
- g.drawImage(lastMiniMe, 0, 0, this);
- if (lastMiniMe != miniMe)
+ g.drawImage(lastMiniMe, 0, 0, getWidth(), getHeight(), this);
+ /* if (lastMiniMe != miniMe)
{
g.setColor(TRANS_GREY);
g.fillRect(0, 0, getWidth(), getHeight());
- }
+ }*/
}
g.setColor(Color.red);
od.drawBox(g);
}
-
}
if ((getWidth() != od.getWidth())
|| (getHeight() != (od.getHeight())))
{
+ if ((getWidth() > 0) && (getHeight() > 0))
+ {
+ od.setWidth(getWidth());
+ od.setHeight(getHeight());
+ }
+
+ setPreferredSize(new Dimension(od.getWidth(), od.getHeight()));
+ setBoxPosition();
+
updateOverviewImage();
setBoxPosition();
}