rendered paste body/* 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.*;
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());
JPanel panel = new JPanel();
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};
for (int f = 0; f < freeWorldID.length; f++) {
fWorld = new JButton("World " + freeWorldID[f]);
add(fWorld);
}
for (int m = 0; m < memberWorldID.length; m++) {
mWorld = new JButton("<html><font color=yellow>World " + memberWorldID[m] + "</color></html>");
add(mWorld);
}
add(panel);
}
}