summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
688f45a)
to resize the puzzle to zero size. Ignore all such requests, in the
assumption that a more sensible resize will be along soon enough
(which does seem to happen, though I haven't debugged the NestedVM
front end hard enough to figure out why the bogus resizes happen in
the first place).
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8094
cda61777-01e9-0310-a592-
d414129be87e
}
public void createBackBuffer(int w, int h, Color bg) {
}
public void createBackBuffer(int w, int h, Color bg) {
- backBuffer = new BufferedImage(w,h, BufferedImage.TYPE_3BYTE_BGR);
- Graphics g = backBuffer.createGraphics();
- g.setColor(bg);
- g.fillRect(0, 0, w, h);
- g.dispose();
+ if (w > 0 && h > 0) {
+ backBuffer = new BufferedImage(w,h, BufferedImage.TYPE_3BYTE_BGR);
+ Graphics g = backBuffer.createGraphics();
+ g.setColor(bg);
+ g.fillRect(0, 0, w, h);
+ g.dispose();
+ }
}
protected void paintComponent(Graphics g) {
}
protected void paintComponent(Graphics g) {