Want more features on Pastebin? Sign Up, it's FREE!
Guest

Main.java

By: a guest on Nov 16th, 2012  |  syntax: Java  |  size: 0.96 KB  |  views: 25  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. package xphnx.pixelgen;
  2.  
  3. import java.util.Scanner;
  4.  
  5. import javax.swing.JFrame;
  6.  
  7. public class Main {
  8.        
  9.         public static void main(String[] args) {
  10.                 System.out.println("PixelAvatarGen");
  11.                 System.out.println("XphnX");
  12.                 System.out.println("Black and white or 8-bit color?");
  13.                 System.out.println("0 = B&W, 1 = 8bit");
  14.                 Scanner scan = new Scanner(System.in);
  15.                 int banana = scan.nextInt();
  16.                 int fruitcake;
  17.                 String pancake;
  18.                 System.out.println("Print name to make into avatar.");
  19.                 fruitcake = scan.nextInt();
  20.                 if(banana == 0) {
  21.                         pancake = BlackWhite.gen(fruitcake);
  22.                 }else{
  23.                         pancake = EightColor.gen(fruitcake);
  24.                 }
  25.                 System.out.println(pancake);
  26.                 scan.close();
  27.                 JFrame frame = new JFrame("Picture");
  28.                 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  29.                 Arranger.setValues(pancake);
  30.                 Screen viewer = new Screen(Arranger.pixels, Arranger.proxlol);
  31.                 frame.add(viewer);
  32.                 frame.setSize(160, 160);
  33.                 frame.setVisible(true);
  34.                
  35.         }
  36.  
  37. }
clone this paste RAW Paste Data