18 lines
446 B
Java
18 lines
446 B
Java
import javax.swing.*;
|
|
import java.awt.*;
|
|
|
|
public class CanvasDumpTruck extends JComponent {
|
|
public DrawningDumpTruck _drawningDumpTruck;
|
|
public CanvasDumpTruck() {}
|
|
|
|
public void paintComponent(Graphics g) {
|
|
if (_drawningDumpTruck == null) {
|
|
return;
|
|
}
|
|
super.paintComponents(g);
|
|
Graphics2D g2d = (Graphics2D) g;
|
|
_drawningDumpTruck.DrawTransport(g2d);
|
|
super.repaint();
|
|
}
|
|
}
|