Esempio n. 1
0
 public static void main(String[] args) {
   JFrame frame = new JFrame();
   ContactList list = new ContactList();
   Page view = new Page();
   MainControl ctrl = new MainControl(list, view);
   frame.add(view);
   frame.setResizable(false);
   frame.setPreferredSize(new Dimension(800, 400));
   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   frame.pack();
   ImageIcon ii = new ImageIcon("res/images/AllnetLogo.png");
   frame.setIconImage(ii.getImage());
   frame.setVisible(true);
   System.out.println(
       "Created " + list.size() + " contacts out of " + ctrl.getBruteLen() + " generated values.");
 }
Esempio n. 2
0
 private void genBrute() {
   for (int i = 1; i <= LEN; i++) {
     count += (int) Math.pow(n, i);
   }
   bruteList = new String[count];
   count -= 1;
   genBrute("");
   int group = 0;
   for (String s : bruteList) {
     // System.out.println(s);
     if (AHRA.validate(s)) {
       cList.addContact(new Contact(new AHRA(s), group % 3 + "", s, s));
       group++;
     }
   }
 }