- @Override
- public void getEvents(final List<TInputEvent> queue) {
- if (terminal.hasEvents()) {
- terminal.getEvents(queue);
- }
+ public SwingBackend(final JComponent component, final Object listener,
+ final int windowWidth, final int windowHeight, final int fontSize) {
+
+ // Create a Swing backend using a JComponent
+ terminal = new SwingTerminal(component, windowWidth, windowHeight,
+ fontSize, listener);
+
+ // Hang onto the session info
+ this.sessionInfo = ((SwingTerminal) terminal).getSessionInfo();
+
+ // SwingTerminal is the screen too
+ screen = (SwingTerminal) terminal;