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

17 lines
293 B
Java
Raw Permalink Normal View History

2022-10-28 15:45:35 +04:00
import javax.swing.*;
import java.awt.*;
public class Canvas extends JComponent {
2022-11-02 09:51:14 +04:00
Form form;
public Canvas(Form form) {
2022-10-28 15:45:35 +04:00
this.form = form;
}
@Override
public void paintComponent(Graphics g) {
Graphics2D g2 = (Graphics2D) g;
2022-11-15 18:20:34 +04:00
2022-11-02 09:51:14 +04:00
form.Draw(g2);
2022-10-28 15:45:35 +04:00
}
}