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-02 09:51:14 +04:00
|
|
|
form.Draw(g2);
|
2022-10-28 15:45:35 +04:00
|
|
|
}
|
|
|
|
}
|