All pastes #838984 Raw Edit

World Selection

public text v1 · immutable
#838984 ·published 2007-12-30 20:02 UTC
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();

	JButton world1 = new JButton("World 1");
	JButton world2 = new JButton("<html><font color=yellow>World 2</color></html>");
	JButton world3 = new JButton("World 3");
	JButton world4 = new JButton("World 4");
	JButton world5 = new JButton("World 5");
	JButton world6 = new JButton("<html><font color=yellow>World 6</color></html>");
	JButton world7 = new JButton("World 7");
	JButton world8 = new JButton("World 8");
	JButton world9 = new JButton("<html><font color=yellow>World 9</color></html>");
	JButton world10 = new JButton("World 10");
	JButton world11 = new JButton("World 11");
	JButton world12 = new JButton("World 12");
	JButton world13 = new JButton("World 13");
	JButton world14 = new JButton("World 14");
	JButton world15 = new JButton("World 15");
	JButton world16 = new JButton("World 16");
	JButton world17 = new JButton("World 17");
	JButton world18 = new JButton("<html><font color=yellow>World 18</color></html>");
	JButton world19 = new JButton("World 19");
	JButton world20 = new JButton("World 20");
	JButton world21 = new JButton("World 21");
	JButton world22 = new JButton("<html><font color=yellow>World 22</color></html>");
	JButton world23 = new JButton("<html><font color=yellow>World 23</color></html>");
	JButton world24 = new JButton("<html><font color=yellow>World 24</color></html>");
	JButton world25 = new JButton("World 25");
	JButton world26 = new JButton("<html><font color=yellow>World 26</color></html>");
	JButton world27 = new JButton("<html><font color=yellow>World 27</color></html>");
	JButton world28 = new JButton("<html><font color=yellow>World 28</color></html>");
	JButton world29 = new JButton("World 29");
	JButton world30 = new JButton("World 30");
	JButton world31 = new JButton("<html><font color=yellow>World 31</color></html>");
	JButton world32 = new JButton("World 32");
	JButton world33 = new JButton("World 33");
	JButton world34 = new JButton("World 34");
	JButton world35 = new JButton("World 35");
	JButton world36 = new JButton("<html><font color=yellow>World 36</color></html>");
	JButton world37 = new JButton("World 37");
	JButton world38 = new JButton("World 38");
	JButton world39 = new JButton("<html><font color=yellow>World 39</color></html>");
	JButton world40 = new JButton("World 40");
	JButton world41 = new JButton("World 41");
	JButton world42 = new JButton("<html><font color=yellow>World 42</color></html>");
	JButton world43 = new JButton("World 43");
	JButton world44 = new JButton("<html><font color=yellow>World 44</color></html>");
	JButton world45 = new JButton("<html><font color=yellow>World 45</color></html>");
	JButton world46 = new JButton("<html><font color=yellow>World 46</color></html>");
	JButton world47 = new JButton("World 47");
	JButton world48 = new JButton("<html><font color=yellow>World 48</color></html>");
	JButton world49 = new JButton("World 49");
	JButton world50 = new JButton("World 50");
	JButton world51 = new JButton("World 51");
	JButton world52 = new JButton("World 52");
	JButton world53 = new JButton("<html><font color=yellow>World 53</color></html>");
	JButton world54 = new JButton("<html><font color=yellow>World 54</color></html>");
	JButton world55 = new JButton("World 55");
	JButton world56 = new JButton("<html><font color=yellow>World 56</color></html>");
	JButton world57 = new JButton("World 57");
	JButton world58 = new JButton("<html><font color=yellow>World 58</color></html>");
	JButton world59 = new JButton("<html><font color=yellow>World 59</color></html>");
	JButton world60 = new JButton("World 60");
	JButton world61 = new JButton("World 61");
	JButton world62 = new JButton("World 62");
	JButton world63 = new JButton("World 63");
	JButton world64 = new JButton("<html><font color=yellow>World 64</color></html>");
	JButton world65 = new JButton("<html><font color=yellow>World 65</color></html>");
	JButton world66 = new JButton("<html><font color=yellow>World 66</color></html>");
	JButton world67 = new JButton("World 67");
	JButton world68 = new JButton("World 68");
	JButton world69 = new JButton("<html><font color=yellow>World 69</color></html>");
	JButton world70 = new JButton("<html><font color=yellow>World 70</color></html>");
	JButton world71 = new JButton("<html><font color=yellow>World 71</color></html>");
	JButton world72 = new JButton("World 72");
	JButton world73 = new JButton("World 73");
	JButton world74 = new JButton("World 74");
	JButton world75 = new JButton("World 75");
	JButton world76 = new JButton("<html><font color=yellow>World 76</color></html>");
	JButton world77 = new JButton("<html><font color=yellow>World 77</color></html>");
	JButton world78 = new JButton("<html><font color=yellow>World 78</color></html>");
	JButton world79 = new JButton("<html><font color=yellow>World 79</color></html>");
	JButton world80 = new JButton("World 80");
	JButton world81 = new JButton("World 81");
	JButton world82 = new JButton("<html><font color=yellow>World 82</color></html>");
	JButton world83 = new JButton("<html><font color=yellow>World 83</color></html>");
	JButton world84 = new JButton("<html><font color=yellow>World 84</color></html>");
	JButton world85 = new JButton("World 85");
	JButton world86 = new JButton("World 86");
	JButton world87 = new JButton("World 87");
	JButton world88 = new JButton("<html><font color=yellow>World 88</color></html>");
	JButton world89 = new JButton("World 89");
	JButton world90 = new JButton("<html><font color=yellow>World 90</color></html>");
	JButton world91 = new JButton("<html><font color=yellow>World 91</color></html>");
	JButton world92 = new JButton("<html><font color=yellow>World 92</color></html>");
	JButton world93 = new JButton("World 93");
	JButton world94 = new JButton("World 94");
	JButton world95 = new JButton("World 95");
	JButton world96 = new JButton("World 96");
	JButton world97 = new JButton("<html><font color=yellow>World 97</color></html>");
	JButton world98 = new JButton("<html><font color=yellow>World 98</color></html>");
	JButton world99 = new JButton("<html><font color=yellow>World 99</color></html>");
	JButton world100 = new JButton("<html><font color=yellow>World 100</color></html>");
	JButton world101 = new JButton("World 101");
	JButton world102 = new JButton("World 102");
	JButton world103 = new JButton("<html><font color=yellow>World 103</color></html>");
	JButton world104 = new JButton("<html><font color=yellow>World 104</color></html>");
	JButton world105 = new JButton("World 105");
	JButton world106 = new JButton("World 106");
	JButton world107 = new JButton("World 107");
	JButton world108 = new JButton("World 108");
	JButton world109 = new JButton("World 109");
	JButton world110 = new JButton("<html><font color=yellow>World 110</color></html>");
	JButton world111 = new JButton("<html><font color=yellow>World 111</color></html>");
	JButton world112 = new JButton("<html><font color=yellow>World 112</color></html>");
	JButton world113 = new JButton("World 113");
	JButton world114 = new JButton("<html><font color=yellow>World 114</color></html>");
	JButton world115 = new JButton("<html><font color=yellow>World 115</color></html>");
	JButton world116 = new JButton("<html><font color=yellow>World 116</color></html>");
	JButton world117 = new JButton("World 117");
	JButton world118 = new JButton("World 118");
	JButton world119 = new JButton("World 119");
	JButton world120 = new JButton("World 120");
	JButton world121 = new JButton("<html><font color=yellow>World 121</color></html>");
	JButton world122 = new JButton("World 122");
	JButton world123 = new JButton("World 123");
	JButton world124 = new JButton("<html><font color=yellow>World 124</color></html>");
	JButton world125 = new JButton("World 125");
	JButton world126 = new JButton("World 126");
	JButton world127 = new JButton("World 127");
	JButton world128 = new JButton("World 128");
	JButton world129 = new JButton("<html><font color=yellow>World 129</color></html>");
	JButton world130 = new JButton("<html><font color=yellow>World 130</color></html>");
	JButton world131 = new JButton("<html><font color=yellow>World 131</color></html>");
	JButton world132 = new JButton("<html><font color=yellow>World 132</color></html>");
	JButton world133 = new JButton("World 133");
	JButton world134 = new JButton("World 134");
	JButton world135 = new JButton("World 135");
	JButton world136 = new JButton("World 136");
	JButton world137 = new JButton("<html><font color=yellow>World 137</color></html>");
	JButton world138 = new JButton("<html><font color=yellow>World 138</color></html>");
	JButton world139 = new JButton("World 139");
	JButton world140 = new JButton("World 140");
	JButton world141 = new JButton("World 141");
	JButton world142 = new JButton("World 142");
	JButton world143 = new JButton("<html><font color=yellow>World 143</color></html>");
	JButton world144 = new JButton("<html><font color=yellow>World 144</color></html>");
	JButton world145 = new JButton("<html><font color=yellow>World 145</color></html>");
	JButton world146 = new JButton("World 146");
	JButton world147 = new JButton("World 147");
	JButton world148 = new JButton("World 148");
	JButton world149 = new JButton("World 149");
	JButton world150 = new JButton("World 150");
	JButton world151 = new JButton("<html><font color=yellow>World 151</color></html>");
	JButton world152 = new JButton("World 152");
	JButton world153 = new JButton("World 153");
	JButton world154 = new JButton("World 154");
	JButton world155 = new JButton("World 155");
	JButton world156 = new JButton("World 156");
	JButton world157 = new JButton("<html><font color=yellow>World 157</color></html>");
	JButton world158 = new JButton("<html><font color=yellow>World 158</color></html>");
	JButton world159 = new JButton("<html><font color=yellow>World 159</color></html>");

	add(panel);

	for (int x = 0; x < 160; x++) {
	    add(worldx); //This is what needs to be fixed.
	}
    }
}