16 lines
308 B
Java
16 lines
308 B
Java
|
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);
|
||
|
}
|
||
|
}
|