import java.awt.*; import java.awt.event.*; import java.text.*; import javax.swing.*; public class KoCalc extends JFrame { private JLabel strikeJLabel; private JLabel defenseJLabel; private JLabel spyJLabel; private JLabel sentryJLabel; private JLabel raceJLabel; private JCheckBox bpmJCheckBox; private JCheckBox chariotJCheckBox; private JCheckBox dragonJCheckBox; private JCheckBox wargJCheckBox; private JCheckBox warbladeJCheckBox; private JCheckBox spearJCheckBox; private JCheckBox clubJCheckBox; private JCheckBox slingJCheckBox; private JCheckBox knifeJCheckBox; private JCheckBox stickJCheckBox; private JCheckBox isJCheckBox; private JCheckBox dragonskinJCheckBox; private JCheckBox heavyshieldJCheckBox; private JCheckBox plateJCheckBox; private JCheckBox chainmailJCheckBox; private JCheckBox shieldJCheckBox; private JCheckBox helmetJCheckBox; private JCheckBox nunJCheckBox; private JCheckBox keyJCheckBox; private JCheckBox hookJCheckBox; private JCheckBox cloakJCheckBox; private JCheckBox dirkJCheckBox; private JCheckBox ropeJCheckBox; private JCheckBox towerJCheckBox; private JCheckBox dogJCheckBox; private JCheckBox tripwireJCheckBox; private JCheckBox hornJCheckBox; private JCheckBox candleJCheckBox; private JRadioButton humanJRadioButton; private JRadioButton dwarfJRadioButton; private JRadioButton elfJRadioButton; private JRadioButton orcJRadioButton; private JRadioButton undeadJRadioButton; public KoCalc() { createUserInterface(); } public void createUserInterface() { Container contentPane = getContentPane(); contentPane.setLayout(null); final int x1=10, x2=120, x3=230, x4=340, y1=40, xx1=100, yy1=20; strikeJLabel = new JLabel(); strikeJLabel.setBounds(x1, 10, xx1, yy1); strikeJLabel.setText("Strike"); strikeJLabel.setHorizontalAlignment(JLabel.CENTER); contentPane.add(strikeJLabel); defenseJLabel = new JLabel(); defenseJLabel.setBounds(x2, 10, xx1, yy1); defenseJLabel.setText("Defense"); defenseJLabel.setHorizontalAlignment(JLabel.CENTER); contentPane.add(defenseJLabel); spyJLabel = new JLabel(); spyJLabel.setBounds(x3, 10, xx1, yy1); spyJLabel.setText("Spy"); spyJLabel.setHorizontalAlignment(JLabel.CENTER); contentPane.add(spyJLabel); sentryJLabel = new JLabel(); sentryJLabel.setBounds(x4, 10, xx1, yy1); sentryJLabel.setText("Sentry"); sentryJLabel.setHorizontalAlignment(JLabel.CENTER); contentPane.add(sentryJLabel); //Attack Col 1 bpmJCheckBox = new JCheckBox(); bpmJCheckBox.setBounds(x1, y1, xx1, yy1); bpmJCheckBox.setText("BPM"); contentPane.add(bpmJCheckBox); chariotJCheckBox = new JCheckBox(); chariotJCheckBox.setBounds(x1, y1+20, xx1, yy1); chariotJCheckBox.setText("Chariot"); contentPane.add(chariotJCheckBox); dragonJCheckBox = new JCheckBox(); dragonJCheckBox.setBounds(x1, y1+40, xx1, yy1); dragonJCheckBox.setText("Dragon"); contentPane.add(dragonJCheckBox); wargJCheckBox = new JCheckBox(); wargJCheckBox.setBounds(x1, y1+60, xx1, yy1); wargJCheckBox.setText("Warg"); contentPane.add(wargJCheckBox); warbladeJCheckBox = new JCheckBox(); warbladeJCheckBox.setBounds(x1, y1+80, xx1, yy1); warbladeJCheckBox.setText("Warblade"); contentPane.add(warbladeJCheckBox); spearJCheckBox = new JCheckBox(); spearJCheckBox.setBounds(x1, y1+100, xx1, yy1); spearJCheckBox.setText("Spear"); contentPane.add(spearJCheckBox); clubJCheckBox = new JCheckBox(); clubJCheckBox.setBounds(x1, y1+120, xx1, yy1); clubJCheckBox.setText("Club"); contentPane.add(clubJCheckBox); slingJCheckBox = new JCheckBox(); slingJCheckBox.setBounds(x1, y1+140, xx1, yy1); slingJCheckBox.setText("Sling"); contentPane.add(slingJCheckBox); knifeJCheckBox = new JCheckBox(); knifeJCheckBox.setBounds(x1, y1+160, xx1, yy1); knifeJCheckBox.setText("Knife"); contentPane.add(knifeJCheckBox); stickJCheckBox = new JCheckBox(); stickJCheckBox.setBounds(x1, y1+180, xx1, yy1); stickJCheckBox.setText("Stick"); contentPane.add(stickJCheckBox); //Defense Col 2 isJCheckBox = new JCheckBox(); isJCheckBox.setBounds(x2, y1, xx1, yy1); isJCheckBox.setText("IS"); contentPane.add(isJCheckBox); dragonskinJCheckBox = new JCheckBox(); dragonskinJCheckBox.setBounds(x2, y1+20, xx1, yy1); dragonskinJCheckBox.setText("Dragonskin"); contentPane.add(dragonskinJCheckBox); heavyshieldJCheckBox = new JCheckBox(); heavyshieldJCheckBox.setBounds(x2, y1+40, xx1, yy1); heavyshieldJCheckBox.setText("Heavy Shield"); contentPane.add(heavyshieldJCheckBox); plateJCheckBox = new JCheckBox(); plateJCheckBox.setBounds(x2, y1+60, xx1, yy1); plateJCheckBox.setText("Plate Armor"); contentPane.add(plateJCheckBox); chainmailJCheckBox = new JCheckBox(); chainmailJCheckBox.setBounds(x2, y1+80, xx1, yy1); chainmailJCheckBox.setText("Chainmail"); contentPane.add(chainmailJCheckBox); shieldJCheckBox = new JCheckBox(); shieldJCheckBox.setBounds(x2, y1+100, xx1, yy1); shieldJCheckBox.setText("Shield"); contentPane.add(shieldJCheckBox); helmetJCheckBox = new JCheckBox(); helmetJCheckBox.setBounds(x2, y1+120, xx1, yy1); helmetJCheckBox.setText("Helmet"); contentPane.add(helmetJCheckBox); //Spy col 3 nunJCheckBox = new JCheckBox(); nunJCheckBox.setBounds(x3, y1, xx1, yy1); nunJCheckBox.setText("Nunchaku"); contentPane.add(nunJCheckBox); keyJCheckBox = new JCheckBox(); keyJCheckBox.setBounds(x3, y1+20, xx1, yy1); keyJCheckBox.setText("Skeleton Key"); contentPane.add(keyJCheckBox); hookJCheckBox = new JCheckBox(); hookJCheckBox.setBounds(x3, y1+40, xx1, yy1); hookJCheckBox.setText("Hook"); contentPane.add(hookJCheckBox); cloakJCheckBox = new JCheckBox(); cloakJCheckBox.setBounds(x3, y1+60, xx1, yy1); cloakJCheckBox.setText("Cloak"); contentPane.add(cloakJCheckBox); dirkJCheckBox = new JCheckBox(); dirkJCheckBox.setBounds(x3, y1+80, xx1, yy1); dirkJCheckBox.setText("Dirk"); contentPane.add(dirkJCheckBox); ropeJCheckBox = new JCheckBox(); ropeJCheckBox.setBounds(x3, y1+100, xx1, yy1); ropeJCheckBox.setText("Rope"); contentPane.add(ropeJCheckBox); //Sentry col 4 towerJCheckBox = new JCheckBox(); towerJCheckBox.setBounds(x4, y1, xx1, yy1); towerJCheckBox.setText("Tower"); contentPane.add(towerJCheckBox); dogJCheckBox = new JCheckBox(); dogJCheckBox.setBounds(x4, y1+20, xx1, yy1); dogJCheckBox.setText("Guard Dog"); contentPane.add(dogJCheckBox); tripwireJCheckBox = new JCheckBox(); tripwireJCheckBox.setBounds(x4, y1+40, xx1, yy1); tripwireJCheckBox.setText("Tripwire"); contentPane.add(tripwireJCheckBox); hornJCheckBox = new JCheckBox(); hornJCheckBox.setBounds(x4, y1+60, xx1, yy1); hornJCheckBox.setText("Horn"); contentPane.add(hornJCheckBox); candleJCheckBox = new JCheckBox(); candleJCheckBox.setBounds(x4, y1+80, xx1, yy1); candleJCheckBox.setText("Big Candle"); contentPane.add(candleJCheckBox); //Radio Button Interface raceJLabel = new JLabel(); raceJLabel.setBounds() humanJRadioButton = new JRadioButton(); humanJRadioButton.setBounds(10, 250, 80, yy1); humanJRadioButton.setText("Humans"); contentPane.add(humanJRadioButton); dwarfJRadioButton = new JRadioButton(); dwarfJRadioButton.setBounds(92, 250, 80, yy1); dwarfJRadioButton.setText("Dwarves"); contentPane.add(dwarfJRadioButton); elfJRadioButton = new JRadioButton(); elfJRadioButton.setBounds(175, 250, 80, yy1); elfJRadioButton.setText("Elves"); contentPane.add(elfJRadioButton); orcJRadioButton = new JRadioButton(); orcJRadioButton.setBounds(257, 250, 80, yy1); orcJRadioButton.setText("Orcs"); contentPane.add(orcJRadioButton); undeadJRadioButton = new JRadioButton(); undeadJRadioButton.setBounds(340, 250, 80, yy1); undeadJRadioButton.setText("Undead"); contentPane.add(undeadJRadioButton); setVisible(true); setSize(450, 500); setTitle("KoCalc"); } public static void main(String[] args) { KoCalc application = new KoCalc(); application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } }