/* worldSwitcher.java * Created: Friday, December 28, 2007 * By: Mod Adam * Description: This program will allow a user to click on * a RuneScape World, and it will then open the users * browser and bring you to that World. */ import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; import java.util.Arrays; public class worldSwitcher extends JFrame { public static void main(String[] args) { worldSwitcher frame = new worldSwitcher(); frame.setTitle("RuneScape World Switcher by Mod Adam"); //Title frame.setSize(750, 710); //Width, Height frame.setVisible(true); frame.setDefaultCloseOperation(EXIT_ON_CLOSE); } public worldSwitcher() { setLayout(new FlowLayout()); int[] memberWorldID = {2, 6, 9, 12, 18, 22, 23, 24, 26, 27, 28, 31, 36, 39, 42, 44, 45, 46, 48, 53, 54, 56, 58, 59, 64, 65, 66, 69, 70, 71, 76, 77, 78, 79, 82, 83, 84, 88, 89, 91, 92, 97, 98, 99, 100, 103, 104, 110, 111, 112, 114, 115, 116, 121, 124, 129, 130, 131, 132, 137, 138, 143, 144, 145, 151, 157, 158, 159}; int[] freeWorldID = {1, 3, 4, 5, 7, 8, 10, 11, 13, 14, 15, 16, 17, 19, 20, 21, 25, 29, 30, 32, 33, 34, 35, 37, 38, 40, 41, 43, 47, 50, 51, 52, 55, 57, 61, 62, 63, 67, 68, 72, 74, 75, 80, 81, 85, 86, 87, 90, 93, 94, 95, 96, 101, 102, 105, 106, 107, 108, 109, 113, 117, 118, 119, 123, 125, 126, 127, 128, 133, 134, 136, 141, 142, 149, 152, 153, 154, 155}; Arrays.sort(memberWorldID); Arrays.sort(freeWorldID); int[] worlds = new int[memberWorldID.length + freeWorldID.length]; System.arraycopy(memberWorldID, 0, worlds, 0, memberWorldID.length); System.arraycopy(freeWorldID, 0, worlds, memberWorldID.length, freeWorldID.length); Arrays.sort(worlds); for (int x = 0; x < worlds.length; x++) { JButton fWorld = new JButton("World " + worlds[x]); add(fWorld); } } }