/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package javaapplication1; import javax.swing.*; import java.awt.*; import java.awt.event.*; /** * * @author Сергей */ public class JavaApplication1 extends JFrame{ public MyCanvas canvas; public DisplayMode dm; JavaApplication1(String title){ super(title); setVisible(true); dm=getGraphicsConfiguration().getDevice().getDisplayMode(); setSize(dm.getWidth(),dm.getHeight()); canvas=new MyCanvas(); add(canvas); } public static void main(String[] args) { JavaApplication1 ja=new JavaApplication1("Канва"); } }