Package Background

Examples of Background.Contestant


     
     
      @Override
      public void actionPerformed(final ActionEvent the_event)
      {
        Contestant c = SignInGUI.getCurrentContestant();
        Entry e1 = c.getEntry1();
        Entry e2 = c.getEntry2();
        Entry e3 = c.getEntry3();
       
        if (category.getSelectedItem().equals("")) {
          JOptionPane.showMessageDialog(my_user_card_panel, "You must select a category.");
         
        }else if(e1.getCategory().equals(category.getSelectedItem().toString()) || e2.getCategory().equals(category.getSelectedItem().toString()) ||
View Full Code Here


     * Action performed method that displays the about message.
     * @param the_event The event, ignored.
     */
    @Override
    public void actionPerformed(final ActionEvent the_event) {
      Contestant c = SignInGUI.getCurrentContestant();
      ArrayList<Entry> contestantEntryList = c.getEntryList();
     
      if(contestantEntryList.size() == 0){
     
        Entry first_entry = c.getEntry1();
        first_entry.setDescription(description.getText());
        first_entry.setCategory((String)category.getSelectedItem());
        first_entry.setDesign(draft.getdraft());
        first_entry.setRelease(acceptStatus);
        c.addEntryToList(first_entry);
        Lists.saveData();
        JOptionPane.showMessageDialog(null, "Thank you for submitting an entry! You have 2 entries left!");
        dispose();
      }
     
      else if(contestantEntryList.size() == 1){
        Entry second_entry = c.getEntry2();
        second_entry.setDescription(description.getText());
        second_entry.setCategory((String)category.getSelectedItem());
        second_entry.setDesign(draft.getdraft());
        second_entry.setRelease(acceptStatus);
        c.addEntryToList(second_entry);
        Lists.saveData();
        JOptionPane.showMessageDialog(null, "Thank you for submitting an entry! You have 1 entry left!");
        dispose();
      }

      else if(contestantEntryList.size() == 2){
        Entry third_entry = c.getEntry3();
        third_entry.setDescription(description.getText());
        third_entry.setCategory((String)category.getSelectedItem());
        third_entry.setDesign(draft.getdraft());
        third_entry.setRelease(acceptStatus);
        c.addEntryToList(third_entry);
        Lists.saveData();
        JOptionPane.showMessageDialog(null, "Thank you for submitting an entry! " +
            "You have submitted the maximum number of 3 entries.");
        dispose();
      }
View Full Code Here

        // Contestant
        if (MY_CONTESTANT.isSelected() && !MY_JUDGE.isSelected()
            && !MY_ORGANIZER.isSelected()) {
          ArrayList<Contestant> contestantList = Lists.getContestantList();
          Contestant selected_contestant = null;//////////////////////////////////
          for (Contestant c : contestantList) {
            if (c.getUserName().equals(username)
                && c.getPassword().equals(password)) {
              c.setActive();
              current_contestant = c;
View Full Code Here

    try {
    myPicture = ImageIO.read(new File("JustBeWeave.bmp"));
  } catch (IOException e) {
    e.printStackTrace();
  }
    Contestant currentContestant = null;
   
    picLabel = new JLabel(new ImageIcon( myPicture ));
    //picLabel.setBackground(Color.BLACK);
    MY_PANEL.add(picLabel, BorderLayout.CENTER);
    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    setVisible(true);
    createButtons();
    addEvent();
    add(MY_PANEL);
    setPreferredSize(MY_SIZE);
    Lists.readData();
    ArrayList<Contestant> contestantList = Lists.getContestantList();
   
    for (Contestant c : contestantList){//get the last contestant in the list.
      currentContestant = c;
      //Lists.addWinner(c);//everybody is a winner!
    }
    RegistrationGUI.registration_number = currentContestant.getRegistrationNumber() + 1;
   
   
    repaint();
    pack();
View Full Code Here

    MY_JUDGE_FILE = new File(MY_USER_HOMEFOLDER + MY_FILE_SEPERATOR + "Desktop" + MY_FILE_SEPERATOR + "judge.txt");
    MY_CONTESTANT_LIST =  Lists.getContestantList();
   
    c1 = (Contestant) MY_CONTESTANT_LIST.get(0);
    c2 = (Contestant) MY_CONTESTANT_LIST.get(1);
    Lists.addContestant(new Contestant("chris petcher", "chrispetcher@gmail.com", "false", "chrispetcher",
        "chrispetcher", "555-555-5555", 0));
    c3 = (Contestant) MY_CONTESTANT_LIST.get(2);
  }
View Full Code Here

    }

    if (valid) {
      String name = "";
      name = (my_list.get(0) + " " + my_list.get(1));
      Contestant c = new Contestant(name, my_list.get(2), my_list.get(3),
          my_list.get(4), my_list.get(5), (my_list.get(6)), registration_number);
      registration_number++;
      c.isContestant = true;
      RegistrationGUI r = Main_GUI.getRegistrationGUI();
      resetRegistration();
      JOptionPane.showMessageDialog(null,
          "Congratulations for registering! A contestant who does not make any " +
          "entries is considered to be an attendee only.");
      r.dispose();
     
      System.out.println("I am a contestant/attendee.");
      System.out.println("My name: " + c.getName());
      System.out.println("My email: " + c.getEmail());
      System.out.println("My phone number: " + c.getPhoneNumber());
      System.out.println("My registration number = " + c.getRegistrationNumber());

      Lists.saveData();

    }
   
View Full Code Here

      String password = new String(temp);
     
      ArrayList<Contestant> contestant_list = Lists.getContestantList();
      boolean valid_user_name = true;
      for(int i = 0; i < contestant_list.size(); i++){
          Contestant c = contestant_list.get(i);
        String contestant_user_name = c.getUserName();
        if(contestant_user_name.equals(user_name)){
          valid_user_name = false;
          JOptionPane.showMessageDialog(null, "User name: " +
              user_name + "already exist");
          break;
View Full Code Here

TOP

Related Classes of Background.Contestant

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.