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

22 lines
487 B
Java
Raw Normal View History

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