mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
The Java console keeps showing up error reports due to being asked
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). [originally from svn r8094]
This commit is contained in:
@ -476,11 +476,13 @@ public class PuzzleApplet extends JApplet implements Runtime.CallJavaCB {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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);
|
if (w > 0 && h > 0) {
|
||||||
Graphics g = backBuffer.createGraphics();
|
backBuffer = new BufferedImage(w,h, BufferedImage.TYPE_3BYTE_BGR);
|
||||||
g.setColor(bg);
|
Graphics g = backBuffer.createGraphics();
|
||||||
g.fillRect(0, 0, w, h);
|
g.setColor(bg);
|
||||||
g.dispose();
|
g.fillRect(0, 0, w, h);
|
||||||
|
g.dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void paintComponent(Graphics g) {
|
protected void paintComponent(Graphics g) {
|
||||||
|
Reference in New Issue
Block a user