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

19 lines
449 B
Java
Raw Permalink Normal View History

2024-06-10 13:56:47 +04:00
package Drawnings;
import javax.swing.*;
import java.awt.*;
public class CanvasDumpTruck extends JComponent {
public DrawningTruck _drawningTruck;
public CanvasDumpTruck() {}
public void paintComponent(Graphics g) {
if (_drawningTruck == null) {
return;
}
super.paintComponents(g);
Graphics2D g2d = (Graphics2D) g;
_drawningTruck.DrawTransport(g2d);
super.repaint();
}
}