title: How to call Lanterna class to my UserInterface Class?
body: <p>currently what I'm doing is using javac Main.java  and the javac -cp lanterna.jar text.java to make them appear. I want it so that when I do something in my UserInterface.class the lanterna class will appear.</p>
  <p>Here is my code:</p>
  <p><strong>UserInterface.java</strong></p>
  <pre><code>import java.util.Scanner;
  import java.io.IOException;
   
  public class UserInterface {
   
      private QuoteList ql;
      private Scanner scanner;
   
      public UserInterface(QuoteList ql, Scanner scanner) {
          this.ql = ql;
          this.scanner = scanner;
      }
   
      public void start() throws IOException {
          while (true) {
              System.out.print(&quot;Commands:\n&quot; + &quot;1 - import quotes\n&quot; + &quot;2 - add a quote\n&quot; + &quot;3 - share a quote\n&quot; + &quot;4 - tell all quotes\n&quot; + &quot;x - stop\n&quot;);
              String command = scanner.nextLine();
              if (command.equals(&quot;1&quot;)) {
                  System.out.print(&quot;Enter file: &quot;);
                  String file = scanner.nextLine();
                  this.ql.importFile(file);
              }
              else if (command.equals(&quot;2&quot;)) {
                  System.out.print(&quot;Write your quote: &quot;);
                  String q = scanner.nextLine();
                  this.ql.addQuote(q);
              } else if (command.equals(&quot;3&quot;)) {
                  System.out.println(ql.shareQuote());
              } else if (command.equals(&quot;4&quot;)) {
                  this.ql.printQuotes();
              } else if (command.equals(&quot;x&quot;)) {
                  //CALL TEXT CLASS HERE
                  break;
              }
   
          }
      }
  }
  </code></pre>
  <p><strong>Text.java</strong></p>
  <pre><code>import com.googlecode.lanterna.terminal.*;
  import com.googlecode.lanterna.terminal.ansi.*;
  import java.io.IOException;
  
  public class Text {
  
      public static void main (String[] args) throws IOException {
          Terminal terminal = new DefaultTerminalFactory().createTerminal();
          terminal.enterPrivateMode();
          terminal.newTextGraphics().putString(20, 9, &quot;Thank you for using Quote Generator!&quot;);
          terminal.flush();
          terminal.readInput();
          terminal.exitPrivateMode();
      }
  }
  </code></pre>