How would I find out the percentage of data that has been downloaded from this code?
public static void main(String[] args) throws Exception { pageAddressUrl = new URL("http://oldschool1.runescape.com/"); String pageSource = readPageSource("http://oldschool1.runescape.com/"); parseParameters(pageSource); String gamepackFileName = findGamepackFileName(pageSource); URLClassLoader classLoader = new URLClassLoader(new URL[] { new URL( "http://oldschool69.runescape.com/" + gamepackFileName) }); Applet game = (Applet) classLoader.loadClass("client").newInstance(); RS2Loader rs2Loader = new RS2Loader(); game.setStub(rs2Loader); game.init(); game.start(); rs2Loader.add(game); rs2Loader.setDefaultCloseOperation(3); rs2Loader.setSize(773, 531); rs2Loader.setTitle("RuneScape"); rs2Loader.setResizable(false); rs2Loader.setVisible(true); }
I'm going to create a JProgressBar to load up while this is downloading.