import HTML.*;

/*
    This class is an HTMLForm object used to perform
    title searches.  It is derived from HTMLForm.
*/

public class SearchForm extends HTMLForm {

  // Method Name: SearchForm() Constructor
  // Purpose : This is where all of the processing is done
  // in this class.  It creates a the appropriate Input
  // objects that are necessary to perform a search.
  public SearchForm() {

    // Set the action to point to the TitleListServlet
    setAction("/servlet/TitleListServlet");
    setAlignment(CENTER);

    // Build the search string edit box
    HTMLTextInput text_input = new HTMLTextInput();
    text_input.setSize(30);
    text_input.setName("search_string");

    // Add the HTMLTextInput object to the Form
    addObject(text_input);

    // Create and add an HTMLSubmitButton
    HTMLSubmitButton submit_button = new HTMLSubmitButton();
    submit_button.setName("Submit");
    submit_button.setValue("GO");

    addObject(submit_button);
  }
}