// Path: src/logic/RuneScapeAccount.java
// public class RuneScapeAccount {
// 
//     private boolean isValidAccount;
//     public String username;
//     int overallLevel = 0;
//     private final String[] skillNames = {"overall", "attack", "defense", "strength", "hitpoints",
//         "ranged", "prayer", "magic", "cooking", "woodcutting", "fletching",
//         "fishing", "firemaking", "crafting", "smithing", "mining", "herblore",
//         "agility", "thieving", "slayer", "farming", "runecrafting", "hunter", "construction"};
// 
//     public final HashMap<String, RuneScapeLevel> hiscores = new HashMap();
// 
//     String baseUrl = "http://services.runescape.com/m=hiscore_oldschool/index_lite.ws?player=";
// 
//     public RuneScapeAccount(String u) {
// 
//         username = u;
//         isValidAccount = false;
//     }
// 
//     public void loadStats() throws IOException {
// 
//         String rsn = username.replaceAll(" ", "_");
//         BufferedReader in = null;
//         try {
//             URL hiscoreUrl = new URL(baseUrl + username);
//             URLConnection yc = hiscoreUrl.openConnection();
//             in = new BufferedReader(new InputStreamReader(yc.getInputStream()));
//             String inputLine;
//             int c = 0;
//             int totalLevel = 0;
//             int totalExp = 0;
//             while ((inputLine = in.readLine()) != null) {
//                 String[] tokens = inputLine.split(",");
//                 if (tokens.length == 3) {
//                     RuneScapeLevel level = new RuneScapeLevel(Integer.parseInt(tokens[0]), Integer.parseInt(tokens[1]), Integer.parseInt(tokens[2]));
//                     if (c <= skillNames.length) {
//                         hiscores.put(skillNames[c], level);
//                         totalLevel += level.level;
//                         totalExp += level.experience;     
//                     }
//                     c++;
//                 }
//             }
//             RuneScapeLevel combatLevel = new RuneScapeLevel(0, (int) getCombatLevel(), 0);
//             hiscores.put("combat", combatLevel);
//             if(hiscores.get("overall").level == 0){ //will be 0 if player is unranked
//                 hiscores.get("overall").level = totalLevel;
//                 hiscores.get("overall").experience = totalExp;
//             }
//             isValidAccount = true;
//         } catch (IOException ex) {
//             //ex.printStackTrace();
//             isValidAccount = false;
//         } finally {
//             if (in != null) {
//                 in.close();
//             }
//         }
// 
//     }
// 
//     public static boolean isValidRSN(String s) {
//         if (s.length() > 12) {
//             return false;
//         }
//         //determine if any non-alphanumeric characters are in the string, indicating invalid RSN
//         return !s.replace("-", "").replace(" ", "").replace("_", "").matches("^.*[^a-zA-Z0-9 ].*$");
//     }
// 
//     public double getCombatLevel() {
// 
//         return Calculate.calculateCombatLevel(hiscores.get("attack").level, hiscores.get("strength").level,
//                 hiscores.get("defense").level, hiscores.get("prayer").level, hiscores.get("ranged").level,
//                 hiscores.get("magic").level, hiscores.get("hitpoints").level);
//     }
// 
//     public boolean isValidAccount() {
//         return isValidAccount;
//     }
// 
// }
// 
// Path: src/rsclient/coregui/Style.java
// public class Style {
//     
//     public static final Color DEFAULT_GRAY = new Color(51,51,51);
//     
//     public final Color backgroundColor;
//     public final Color foregroundColor;
//     public final Font font;
//     
//     public Style(Color foregroundColor, Color backgroundColor, Font font){
//         this.foregroundColor = foregroundColor;
//         this.backgroundColor = backgroundColor;
//         this.font = font;       
//     }
//     
//     public static Style getDefaultStyle(){
//        
//         return new Style(Color.white, DEFAULT_GRAY, new Font(new JLabel().getFont().getFontName(), Font.PLAIN, new JLabel().getFont().getSize() + 2));
//     }
//     
// }


import java.awt.Color;
import java.util.HashMap;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.border.EtchedBorder;
import logic.RuneScapeAccount;
import net.miginfocom.swing.MigLayout;
import rsclient.coregui.Style;
    }

    private void setup() {
        this.setLayout(new MigLayout(" center, fill, ins 0"));
        this.setBackground(new Color(51, 51, 51));
        this.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED));
        int i = 0;
        for (int row = 0; row < 7; row++) {
            for (int col = 0; col < 3; col++) {
                LevelScorePanel skillPanel = new LevelScorePanel(skillnames[i], Style.getDefaultStyle());
                skillPanels.put(skillnames[i], skillPanel);
                skillPanel.setRolloverListener(this);
                this.add(skillPanel, "cell " + col + " " + row + ",grow, gap 0,");
                i++;
            }
        }

        for (int row = 7; row < 8; row++) {
            for (int col = 0; col < 2; col++) {
                LevelScorePanel skillPanel = new LevelScorePanel(skillnames[i], Style.getDefaultStyle());
                skillPanels.put(skillnames[i], skillPanel);
                skillPanel.setRolloverListener(this);
                this.add(skillPanel, "cell " + col + " " + row + ",grow, gap 0, ");
                i++;

            }
        }

        for (int row = 8; row < 9; row++) {
            for (int col = 0; col < 2; col++) {
// Path: src/logic/RuneScapeAccount.java
// public class RuneScapeAccount {
// 
//     private boolean isValidAccount;
//     public String username;
//     int overallLevel = 0;
//     private final String[] skillNames = {"overall", "attack", "defense", "strength", "hitpoints",
//         "ranged", "prayer", "magic", "cooking", "woodcutting", "fletching",
//         "fishing", "firemaking", "crafting", "smithing", "mining", "herblore",
//         "agility", "thieving", "slayer", "farming", "runecrafting", "hunter", "construction"};
// 
//     public final HashMap<String, RuneScapeLevel> hiscores = new HashMap();
// 
//     String baseUrl = "http://services.runescape.com/m=hiscore_oldschool/index_lite.ws?player=";
// 
//     public RuneScapeAccount(String u) {
// 
//         username = u;
//         isValidAccount = false;
//     }
// 
//     public void loadStats() throws IOException {
// 
//         String rsn = username.replaceAll(" ", "_");
//         BufferedReader in = null;
//         try {
//             URL hiscoreUrl = new URL(baseUrl + username);
//             URLConnection yc = hiscoreUrl.openConnection();
//             in = new BufferedReader(new InputStreamReader(yc.getInputStream()));
//             String inputLine;
//             int c = 0;
//             int totalLevel = 0;
//             int totalExp = 0;
//             while ((inputLine = in.readLine()) != null) {
//                 String[] tokens = inputLine.split(",");
//                 if (tokens.length == 3) {
//                     RuneScapeLevel level = new RuneScapeLevel(Integer.parseInt(tokens[0]), Integer.parseInt(tokens[1]), Integer.parseInt(tokens[2]));
//                     if (c <= skillNames.length) {
//                         hiscores.put(skillNames[c], level);
//                         totalLevel += level.level;
//                         totalExp += level.experience;     
//                     }
//                     c++;
//                 }
//             }
//             RuneScapeLevel combatLevel = new RuneScapeLevel(0, (int) getCombatLevel(), 0);
//             hiscores.put("combat", combatLevel);
//             if(hiscores.get("overall").level == 0){ //will be 0 if player is unranked
//                 hiscores.get("overall").level = totalLevel;
//                 hiscores.get("overall").experience = totalExp;
//             }
//             isValidAccount = true;
//         } catch (IOException ex) {
//             //ex.printStackTrace();
//             isValidAccount = false;
//         } finally {
//             if (in != null) {
//                 in.close();
//             }
//         }
// 
//     }
// 
//     public static boolean isValidRSN(String s) {
//         if (s.length() > 12) {
//             return false;
//         }
//         //determine if any non-alphanumeric characters are in the string, indicating invalid RSN
//         return !s.replace("-", "").replace(" ", "").replace("_", "").matches("^.*[^a-zA-Z0-9 ].*$");
//     }
// 
//     public double getCombatLevel() {
// 
//         return Calculate.calculateCombatLevel(hiscores.get("attack").level, hiscores.get("strength").level,
//                 hiscores.get("defense").level, hiscores.get("prayer").level, hiscores.get("ranged").level,
//                 hiscores.get("magic").level, hiscores.get("hitpoints").level);
//     }
// 
//     public boolean isValidAccount() {
//         return isValidAccount;
//     }
// 
// }
// 
// Path: src/rsclient/coregui/Style.java
// public class Style {
//     
//     public static final Color DEFAULT_GRAY = new Color(51,51,51);
//     
//     public final Color backgroundColor;
//     public final Color foregroundColor;
//     public final Font font;
//     
//     public Style(Color foregroundColor, Color backgroundColor, Font font){
//         this.foregroundColor = foregroundColor;
//         this.backgroundColor = backgroundColor;
//         this.font = font;       
//     }
//     
//     public static Style getDefaultStyle(){
//        
//         return new Style(Color.white, DEFAULT_GRAY, new Font(new JLabel().getFont().getFontName(), Font.PLAIN, new JLabel().getFont().getSize() + 2));
//     }
//     
// }


// Path: src/rsclient/hiscores/LevelsPanel.java
import java.awt.Color;
import java.util.HashMap;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.border.EtchedBorder;
import logic.RuneScapeAccount;
import net.miginfocom.swing.MigLayout;
import rsclient.coregui.Style;

    }

    private void setup() {
        this.setLayout(new MigLayout(" center, fill, ins 0"));
        this.setBackground(new Color(51, 51, 51));
        this.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED));
        int i = 0;
        for (int row = 0; row < 7; row++) {
            for (int col = 0; col < 3; col++) {
                LevelScorePanel skillPanel = new LevelScorePanel(skillnames[i], Style.getDefaultStyle());
                skillPanels.put(skillnames[i], skillPanel);
                skillPanel.setRolloverListener(this);
                this.add(skillPanel, "cell " + col + " " + row + ",grow, gap 0,");
                i++;
            }
        }

        for (int row = 7; row < 8; row++) {
            for (int col = 0; col < 2; col++) {
                LevelScorePanel skillPanel = new LevelScorePanel(skillnames[i], Style.getDefaultStyle());
                skillPanels.put(skillnames[i], skillPanel);
                skillPanel.setRolloverListener(this);
                this.add(skillPanel, "cell " + col + " " + row + ",grow, gap 0, ");
                i++;

            }
        }

        for (int row = 8; row < 9; row++) {
            for (int col = 0; col < 2; col++) {
                LevelScorePanel skillPanel = new LevelScorePanel(skillnames[i], Style.getDefaultStyle());