package tetris.game;

import java.awt.*;
import javax.swing.*;

public class MainConsole{

    private JFrame frame;
    private Canvas canvas;

    public MainConsole(){
        frame = new JFrame("Tetris");
        frame.setSize((Canvas.WIDTH + 7) * Canvas.SIDE_OF_SQUARE,
            (Canvas.HEIGHT + 1) * Canvas.SIDE_OF_SQUARE);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setVisible(true);
        frame.setResizable(false);

        canvas = new Canvas();
        frame.addKeyListener(canvas.getKeyListener());
        frame.add(canvas,BorderLayout.CENTER);
    }

    public static void main(String [] args){
        SwingUtilities.invokeLater(new Runnable(){
            @Override
            public void run(){
                new MainConsole();
            }
        });
    }
}

@@ -454,16 +454,52 @@
 (false);
+%0A%09frame.setLocationRelativeTo(null);
 %0A%0A      
@@ -777,24 +777,444 @@
 void run()%7B%0A
+%09%09JOptionPane.showMessageDialog(null, %09%22Press %5Bup%5D key to rotate the blocks%5Cn%22 + %0A%09%09%09%09%09%09%09%22Press %5Bdown%5D key to move the blocks down%5Cn%22 + %0A%09%09%09%09%09%09%09%22Press %5Bleft%5D key to move the blocks to the left%5Cn%22 +%0A%09%09%09%09%09%09%09%22Press %5Bright%5D key to move the blocks to the right%5Cn%22 +%0A%09%09%09%09%09%09%09%22Press %5Bspace%5D key to move the blocks all the way down%5Cn%22 + %0A%09%09%09%09%09%09%09%22Press %5BP%5D key to pause the game%5Cn%22 +%0A%09%09%09%09%09%09%09%22Press %5BR%5D key to resume the game%5Cn%22);%0A
             

Update description with Canvas class