frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            public Object run() {                SwingPcTextScreen systemScreen = getTextScreenManager().getSystemScreen();                final JComponent screen = systemScreen.getScreenComponent();                initializeKeyboard(systemScreen.getKeyboardDevice());                addPointerDevice(systemScreen.getPointerDevivce());                frame = new JFrame("Console");                frame.addWindowListener(new WindowAdapter(){                    public void windowClosed(WindowEvent e) {                        closeAll();                    }                });                frame.setLayout(new BorderLayout());                frame.add(screen, BorderLayout.CENTER);                frame.pack();                SwingUtilities.invokeLater(new Runnable() {                    public void run() {                        frame.setVisible(true);                        screen.requestFocus();                    }                });                return null;            }