|
@@ -321,6 +321,7 @@ public class BasicDrawing extends JPanel implements Drawing {
|
321
|
321
|
*/
|
322
|
322
|
public BasicDrawing() {
|
323
|
323
|
setLayout(null);
|
|
324
|
+ this.setBackground(new Color(240, 240, 240));
|
324
|
325
|
this.zoomAndPanListener = new ZoomAndPanListener(this,
|
325
|
326
|
ZoomAndPanListener.DEFAULT_MIN_ZOOM_LEVEL, 20, 1.2);
|
326
|
327
|
|
|
@@ -370,7 +371,8 @@ public class BasicDrawing extends JPanel implements Drawing {
|
370
|
371
|
super.paintComponent(g1);
|
371
|
372
|
Graphics2D g = (Graphics2D) g1;
|
372
|
373
|
AffineTransform sTransform = g.getTransform();
|
373
|
|
- g.clearRect(0, 0, getWidth(), getHeight());
|
|
374
|
+ g.setColor(this.getBackground());
|
|
375
|
+ g.fillRect(0, 0, getWidth(), getHeight());
|
374
|
376
|
g.setTransform(zoomAndPanListener.getCoordTransform());
|
375
|
377
|
|
376
|
378
|
if (graphImage != null) {
|
|
@@ -573,7 +575,7 @@ public class BasicDrawing extends JPanel implements Drawing {
|
573
|
575
|
BufferedImage.TYPE_3BYTE_BGR);
|
574
|
576
|
this.graphImage = img;
|
575
|
577
|
this.graphGraphics = img.createGraphics();
|
576
|
|
- this.graphGraphics.setBackground(Color.WHITE);
|
|
578
|
+ this.graphGraphics.setBackground(this.getBackground());
|
577
|
579
|
this.graphGraphics.clearRect(0, 0, this.width, this.height);
|
578
|
580
|
|
579
|
581
|
// Set the zoom and pan listener
|