Пример #1
0
  // checks for input fields
  private boolean CheckAllInputText(
      boolean str1,
      boolean str2,
      boolean str3,
      boolean str4,
      boolean str5,
      boolean str6,
      boolean str7) {
    boolean reslt = true;
    if (str1 == false) {
      EnterRepresentativeName.setBackground(Color.red);
      reslt = false;
    } else {
      EnterRepresentativeName.setBackground(Color.white);
    }

    if (str2 == false) {
      jSpinnerEventTime.setBackground(Color.red);
      reslt = false;
    } else {
      jSpinnerEventTime.setBackground(Color.white);
    }

    if (str3 == false) {
      EnterDetail0.setBackground(Color.red);
      reslt = false;
    } else {
      EnterDetail0.setBackground(Color.white);
    }

    if (str4 == false) {
      EnterDetail1.setBackground(Color.red);
      reslt = false;
    } else {
      EnterDetail1.setBackground(Color.white);
    }

    if (str5 == false) {
      EnterDetail2.setBackground(Color.red);
      reslt = false;
    } else {
      EnterDetail2.setBackground(Color.white);
    }

    if (str6 == false) {
      EnterDetail3.setBackground(Color.red);
      reslt = false;
    } else {
      EnterDetail3.setBackground(Color.white);
    }

    if (str7 == false) {
      EnterEventPlace.setBackground(Color.red);
      reslt = false;
    } else {
      EnterEventPlace.setBackground(Color.white);
    }

    return reslt;
  }