Package ascii

Examples of ascii.Table


    File[] files = pwd.listFiles();

    int col1Width = (int) Math.log10(files.length) + 1;
    int col2Width = 40 - col1Width;

    Table table = new Table(col1Width, col2Width);

    table.addHeader("#", "Command");

    for (int i = 0; i < files.length; i++)
      table.addRow(String.valueOf(i), files[i].getName());

    do {
      int choice;
      String input;

      table.print();

      do {
        do {
          System.out.print("\nChoose a number: ");
          input = scanner.nextLine();
View Full Code Here

TOP

Related Classes of ascii.Table

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.