+ this(listener, 80, 25, 20);
+ }
+
+ /**
+ * Public constructor will spawn a new JFrame with font size 20 pts.
+ *
+ * @param windowWidth the number of text columns to start with
+ * @param windowHeight the number of text rows to start with
+ */
+ public SwingBackend(final int windowWidth, final int windowHeight) {
+ this(null, windowWidth, windowHeight, 20);
+ }
+
+ /**
+ * Public constructor will spawn a new JFrame.
+ *
+ * @param windowWidth the number of text columns to start with
+ * @param windowHeight the number of text rows to start with
+ * @param fontSize the size in points. Good values to pick are: 16, 20,
+ * 22, and 24.
+ */
+ public SwingBackend(final int windowWidth, final int windowHeight,
+ final int fontSize) {
+
+ this(null, windowWidth, windowHeight, fontSize);
+ }
+
+ /**
+ * Public constructor will spawn a new JFrame.
+ *
+ * @param listener the object this backend needs to wake up when new
+ * input comes in
+ * @param windowWidth the number of text columns to start with
+ * @param windowHeight the number of text rows to start with
+ * @param fontSize the size in points. Good values to pick are: 16, 20,
+ * 22, and 24.
+ */
+ public SwingBackend(final Object listener, final int windowWidth,
+ final int windowHeight, final int fontSize) {
+
+ // Create a Swing backend using a JFrame
+ terminal = new SwingTerminal(windowWidth, windowHeight, fontSize,
+ listener);
+
+ // Hang onto the session info
+ this.sessionInfo = ((SwingTerminal) terminal).getSessionInfo();
+
+ // SwingTerminal is the screen too
+ screen = (SwingTerminal) terminal;
+ }
+
+ /**
+ * Public constructor will render onto a JComponent.
+ *
+ * @param component the Swing component to render to
+ * @param listener the object this backend needs to wake up when new
+ * input comes in
+ * @param windowWidth the number of text columns to start with
+ * @param windowHeight the number of text rows to start with
+ * @param fontSize the size in points. Good values to pick are: 16, 20,
+ * 22, and 24.
+ */
+ public SwingBackend(final JComponent component, final Object listener,
+ final int windowWidth, final int windowHeight, final int fontSize) {