#29 avoid potential NPE
[fanfix.git] / src / jexer / backend / SwingSessionInfo.java
index b4c0b59d9f3c6868518dc470a39a7f06fc192401..6d1c644fd5498ad571031fbe8830a8a81985288b 100644 (file)
@@ -35,7 +35,7 @@ import java.awt.Insets;
  * Swing to support queryWindowSize().  The username is blank, language is
  * "en_US", with a 80x25 text window.
  */
-public final class SwingSessionInfo implements SessionInfo {
+public class SwingSessionInfo implements SessionInfo {
 
     // ------------------------------------------------------------------------
     // Variables --------------------------------------------------------------
@@ -207,4 +207,13 @@ public final class SwingSessionInfo implements SessionInfo {
         this.textHeight = textHeight;
     }
 
+    /**
+     * Getter for the underlying Swing component.
+     *
+     * @return the SwingComponent
+     */
+    public SwingComponent getSwingComponent() {
+        return swing;
+    }
+
 }