Advertisement
Guest User

Main.java

a guest
Nov 16th, 2012
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.96 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement