PIbd-14_Antonova_A.A.__Hard/CanvasDumpTruck.java

18 lines
446 B
Java
Raw Permalink Normal View History

2024-05-09 20:09:37 +04:00
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();
}
}