PIbd-12_Karamushko_M.K._Air.../Canvas.java

16 lines
308 B
Java
Raw Normal View History

2022-10-28 15:45:35 +04:00
import javax.swing.*;
import java.awt.*;
public class Canvas extends JComponent {
FormAircraft form;
public Canvas(FormAircraft form) {
this.form = form;
}
@Override
public void paintComponent(Graphics g) {
Graphics2D g2 = (Graphics2D) g;
form.draw(g2);
}
}