import java.awt.Font; import java.io.IOException; import java.net.URL; import java.util.ArrayList; import java.util.Collections; import java.util.Scanner; import javax.swing.JOptionPane; import javax.swing.JScrollPane; import javax.swing.JTextArea; /** * * @author Bill Kraynek */ public class Lotto { static class LottoCount implements Comparable { int number; int count; public LottoCount(int number, int count) { this.number = number; this.count = count; } public int compareTo(LottoCount that) { return that.count - this.count; } } /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { String address = "http://www.flalottery.com/exptkt/l6.htm"; URL locator = new URL(address); Scanner fileScanner = new Scanner(locator.openStream()); int[] lottoNums = new int[53]; for (int i = 0; i < 53; i++) { lottoNums[i] = 0; } ArrayList lottos = new ArrayList(); ArrayList counts = new ArrayList(); for (int i = 0; i < 53; i++) { lottos.add(0); counts.add(new LottoCount(i, 0)); }// end for String out = ""; while (fileScanner.hasNext()) { fileScanner.useDelimiter("[>][1-9][0-9]*[<]"); fileScanner.next(); fileScanner.useDelimiter("