Would Appreciate Your Help - Tables Not Connecting/Pages Not Being Generated

Hi,
I have a recipes section in the site I'm building.
There are 7 categories from which a user can click on.
The first page of each category has a form on it for users to enter a new recipe. Once they've entered a new recipe, the title of it is shown above the form. Here's where the problem starts.
First category is desserts, and I entered two dummy titles as a trial run, Apple and Blueberry. No matter which title I click on, I am taken to the page for Apple. And the thing is, when I click on Blueberry, the url address shows Blueberry as the recipe ID. Which indicates to me that it's recognizing it, but not going to the recipe. What am I missing? Could someone please advise as to how I can have the necessary pages created?
There are two separate tables in my database, Recipes, and Categories. The second table was created after I made the SQL connection in Dreamweaver. Do I need to reestablish the connection, because of when the second table was created?
Thank you.
This is the SQL Join that I have on both the Main Desserts Page, and the one to which a recipe should appear on, Recipes Desserts:
$query = "SELECT title".
"FROM recipes, categories".
"WHERE recipes.cat_id = categories.cat_id";
"AND category = desserts";
Here's the code on the Main Desserts page:
<div id="background">
  <div id="navbar2">
    <ul>
<li><a href="desserts.php">Desserts</a></li>
<li><a href="drinks.php">Drinks</a></li>
<li><a href="fowl.php">Fowl</a></li>
<li><a href="meat.php">Meat</a></li>
<li><a href="pasta.php">Pasta</a></li>
<li><a href="seafood.php">Seafood</a></li>
<li><a class="last" href="vegetables.php">Vegetables</a></li>
</ul>
    <p>
  </div>
  <div id="items">
<ol>
<?php do { ?>
<li><a href="recipesdesserts.php?recipeID=1<?php echo $row_GetRecipes['Title']; ?>"><strong><?php echo $row_GetRecipes['Title']; ?></strong></a></li>
<?php } while ($row_GetRecipes = mysql_fetch_assoc($GetRecipes)); ?>
</ol>
    <p><a href="<?php printf("%s?pageNum_GetRecipes=%d%s", $currentPage, max(0, $pageNum_GetRecipes - 1), $queryString_GetRecipes); ?>">Previous</a> Showing<?php echo ($startRow_GetRecipes + 1) ?>...<?php echo min($startRow_GetRecipes + $maxRows_GetRecipes, $totalRows_GetRecipes) ?> out of <?php echo $totalRows_GetRecipes ?> <a href="<?php printf("%s?pageNum_GetRecipes=%d%s", $currentPage, min($totalPages_GetRecipes, $pageNum_GetRecipes + 1), $queryString_GetRecipes); ?>">Next</a></p>
  </div>
  </div>

I'll try to paint a better picture.
I have two tables in the database.
First table is Recipes. The fields in this one are: Title, Ingredients, Prep, Serves.
Second table is Categories. The fields in this one are: Title, Desserts, Drinks, Fowl, Meat, Pasta, Seafood, Vegetables.
User 1 enters the following into the form:
Title: Apple Strudel
Ingredients: Apples, Flour, Water
Prep: Core and slice apples, etc.
Serves: 6
User 2 enters the following into the form:
Title: Blueberry Pie
Ingredients: Blueberries, Flour, Water
Prep: Wash blueberries, etc.
Serves: 6
Both titles now appear on the Main Desserts page, which is what I want. When a user clicks on the title, "Apple Strudel," they are taken to the page with that recipe on it. When a user clicks on the title, "Blueberry Pie," the ending of the URL address is recipesdesserts.php?recipeID=1Blueberry, but the page that's generated shows the recipe for the Strudel.
Does that help at all?
Thank you.

Similar Messages

  • I would appreciate your help on how to configure a gmail in a way  it  ask  for the password  everytime I connect?. In the only way I can configure it  I have to include the pw when configuring the account  and  after that  it do not ask for pw

    I would appreciate your help on how to configure a gmail in a way  it  ask  for the password  everytime I connect?. In the only way I can configure it  I have to include the pw when configuring the account  and  after that  it do not ask for pw  so  everyone that shares my iPad can  oppen my mail  with  no pw  required.
    Thank

    The iPad is designed to be a single user device, and there is currently no way to password protect the Mail app - even removing the account password from Settings > Mail, Contacts, Calendars will just prevent new mail being downloaded, it won't hide those that have already been downloaded. There is this work-around for the app : https://discussions.apple.com/message/13127632#13127632 . Also there might be third-party email apps that feature password protecting.

  • Would like to comment/review on the Newton Magazine. Do not know how. Would appreciate your help. Many thanks

    Would like to comment/review regarding Newton Magazine and its app. Do not know how. Would appreciate your help. Many thanks.
    Wexmall

    Hi there,
    You may find the article below helpful.
    iTunes Store: Writing a review
    http://support.apple.com/kb/ht3928
    -Griff W

  • How can I reset my Mac to default settings? Or how can I reset it to a prior date? My Mac has a virus and I would like to get rid of it. I would appreciate your help concerning this matter.

    How can I reset my Mac to default settings? Or how can I reset it to a prior date? My Mac has a virus and I would like to get rid of it. I would appreciate your help concerning this matter.

    To restore it follow these instructions: What to do before selling or giving away your Mac.
    Before you do the above check out the following;
    Helpful Links Regarding Malware Problems
    If you are having an immediate problem with ads popping up see The Safe Mac » Adware Removal Guide, AdwareMedic, or Remove unwanted adware that displays pop-up ads and graphics on your Mac - Apple Support.
    Open Safari, select Preferences from the Safari menu. Click on Extensions icon in the toolbar. Disable all Extensions. If this stops your problem, then re-enable them one by one until the problem returns. Now remove that extension as it is causing the problem.
    The following comes from user stevejobsfan0123. I have made minor changes to adapt to this presentation.
    Fix Some Browser Pop-ups That Take Over Safari.
    Common pop-ups include a message saying the government has seized your computer and you must pay to have it released (often called "Moneypak"), or a phony message saying that your computer has been infected, and you need to call a tech support number (sometimes claiming to be Apple) to get it resolved. First, understand that these pop-ups are not caused by a virus and your computer has not been affected. This "hijack" is limited to your web browser. Also understand that these messages are scams, so do not pay any money, call the listed number, or provide any personal information. This article will outline the solution to dismiss the pop-up.
    Quit Safari
    Usually, these pop-ups will not go away by either clicking "OK" or "Cancel." Furthermore, several menus in the menu bar may become disabled and show in gray, including the option to quit Safari. You will likely have to force quit Safari. To do this, press Command + option + esc, select Safari, and press Force Quit.
    Relaunch Safari
    If you relaunch Safari, the page will reopen. To prevent this from happening, hold down the 'Shift' key while opening Safari. This will prevent windows from the last time Safari was running from reopening.
    This will not work in all cases. The shift key must be held at the right time, and in some cases, even if done correctly, the window reappears. In these circumstances, after force quitting Safari, turn off Wi-Fi or disconnect Ethernet, depending on how you connect to the Internet. Then relaunch Safari normally. It will try to reload the malicious webpage, but without a connection, it won't be able to. Navigate away from that page by entering a different URL, i.e. www.apple.com, and trying to load it. Now you can reconnect to the Internet, and the page you entered will appear rather than the malicious one.

  • I would appreciate your help

    This week is my 8thweek of learning java and I am finding it tougher and tougher as the weeks go by. I have been working on this StudentSystem program for about a week now. I have done all I could but I am left with one part which I am finding it tough to handle.
    I would appreciate if a good samaritan could add this code for me. I am at my wits end.
    The program I am trying to write is supposed to add students with their personal information and then display them in a GUI.
    I should be able to select a student and add a grade for that student.
    Finally I should be able to get the average for all the grades added for this student and display the average grade.
    My challenge is how to obtain all the added scores and show the students average in a new model.
    I was thinking of adding a "Get Average" button , which will pop up a new window(Average) displaying the average of all the scores for the Student.
    I just can't figure how to link this average display window to the Get Average button.
    A student can have any number of grades.
    Your help will be very much appreciated
    Thanks in advance
    Little Delmarie.
    THIS IS WHAT I HAVE DONE SO FAR . IT COMPILES nicely in DOS and Visual age
    // CODE GradeSystem
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.event.*;
    import java.awt.*;
    * UsingJLists.java
    * This is a sample program for the use of JLists. You can add a student by entering their
    * information a clicking on add. You can remove a student by entering their information and
    * clicking on remove. They must be in the list to be removed. You can modify a student by
    * entering their information and clicking add. You will be asked for the new student
    * information when using modify. The add and remove buttons will disappear when modifying
    * is underway and the new information is being collected for updating.
    * @author Delmarie
    public class GradeSystem extends JDialog {
    Vector studentGrades = new Vector();
    JButton add, modify, remove;
    JList theJList;
    JPanel buttonPanel, textPanel, labelPanel, masterPanel, jlistPanel, infoPanel;
    JTextField score, possibleScore, gradeType;
    JLabel label1, label2, label3;
    public class ModifyHandler implements ActionListener {
    public void actionPerformed(java.awt.event.ActionEvent actionEvent) {
    // get the student info from the text boxes
    double dScore = 0;
    double dPossibleScore = 0;
    try {
    String str1 = score.getText();
    if (str1 != null) dScore = Double.parseDouble(str1);
    String str2 = possibleScore.getText();
    if (str2 != null) dPossibleScore = Double.parseDouble(str2);
    catch(NumberFormatException e) {}
    String sGradeType = gradeType.getText();
    Grade grade = (Grade)theJList.getSelectedValue();
    if (grade == null) {
    score.setText("");
    possibleScore.setText("");
    gradeType.setText("");
    return;
    grade.setScore(dScore);
    grade.setPossibleScore(dPossibleScore);
    grade.setGradeType(sGradeType);
    theJList.repaint();
    public class RemoveHandler implements ActionListener {
    public void actionPerformed(java.awt.event.ActionEvent actionEvent) {
    int removeIndex = theJList.getSelectedIndex();
    if (removeIndex == -1) {
    score.setText("");
    possibleScore.setText("");
    gradeType.setText("");
    return;
    DefaultListModel model = (DefaultListModel) theJList.getModel();
    model.removeElementAt(removeIndex);
    studentGrades.removeElementAt(removeIndex);
    // clear the textboxes
    score.setText("");
    possibleScore.setText("");
    gradeType.setText("");
    public class AddHandler implements ActionListener {
    public void actionPerformed(ActionEvent actionEvent) {
    // get the student info from the text boxes
    double dScore = 0;
    double dPossibleScore = 0;
    try {
    String str1 = score.getText();
    if (str1 != null) dScore = Double.parseDouble(str1);
    String str2 = possibleScore.getText();
    if (str2 != null) dPossibleScore = Double.parseDouble(str2);
    catch(NumberFormatException e) {}
    String sGradeType = gradeType.getText();
    // get the model and add the student to the model
    Grade g = new Grade();
    g.setScore(dScore);
    g.setPossibleScore(dPossibleScore);
    g.setGradeType(sGradeType);
    studentGrades.add(g);
    DefaultListModel model = (DefaultListModel) theJList.getModel();
    model.addElement(g);
    // display the added element
    theJList.setSelectedValue(g, true);
    public class WindowHandler extends WindowAdapter {
    public void windowClosing(WindowEvent e) {
    setVisible(false);
    /** Creates a new instance of UsingJLists */
    public GradeSystem(JFrame owner, boolean modal) {
    super(owner, modal);
    // create all of the components, put them in panels, and put the panels in JFrame
    add = new JButton("Add");
    modify = new JButton("Modify");
    remove = new JButton("Remove");
    score = new JTextField("");
    score.setColumns(10);
    possibleScore = new JTextField("");
    gradeType = new JTextField("");
    label1 = new JLabel("score");
    label2 = new JLabel("possibleScore");
    label3 = new JLabel("gradeType");
    FlowLayout flow = new FlowLayout();
    FlowLayout flow1 = new FlowLayout();
    FlowLayout flow2 = new FlowLayout();
    GridLayout grid1 = new GridLayout(7,1);
    GridLayout grid2 = new GridLayout(7,1);
    BorderLayout border3 = new BorderLayout();
    buttonPanel = new JPanel(flow);
    buttonPanel.add(add);
    buttonPanel.add(modify);
    buttonPanel.add(remove);
    labelPanel = new JPanel(grid1);
    //labelPanel.setBorder(BorderFactory.createLineBorder(Color.black));
    labelPanel.add(Box.createVerticalStrut(20));
    labelPanel.add(label1);
    labelPanel.add(Box.createVerticalStrut(20));
    labelPanel.add(label2);
    labelPanel.add(Box.createVerticalStrut(20));
    labelPanel.add(label3);
    labelPanel.add(Box.createVerticalStrut(20));
    textPanel = new JPanel(grid2);
    //textPanel.setBorder(BorderFactory.createLineBorder(Color.black));
    textPanel.add(Box.createVerticalStrut(20));
    textPanel.add(score);
    textPanel.add(Box.createVerticalStrut(20));
    textPanel.add(possibleScore);
    textPanel.add(Box.createVerticalStrut(20));
    textPanel.add(gradeType);
    textPanel.add(Box.createVerticalStrut(20));
    infoPanel = new JPanel(new FlowLayout());
    infoPanel.setBorder(BorderFactory.createTitledBorder("Grade Information"));
    infoPanel.add(Box.createHorizontalStrut(10));
    infoPanel.add(textPanel);
    infoPanel.add(Box.createHorizontalStrut(10));
    infoPanel.add(labelPanel);
    infoPanel.add(Box.createHorizontalStrut(10));
    theJList = new JList(new DefaultListModel());
    theJList.addListSelectionListener(new javax.swing.event.ListSelectionListener(){
    public void valueChanged(ListSelectionEvent evt) {
    Grade grade = (Grade)theJList.getSelectedValue();
    if (grade == null) {
    score.setText("");
    possibleScore.setText("");
    gradeType.setText("");
    return;
    score.setText(Double.toString(grade.getScore()));
    possibleScore.setText(Double.toString(grade.getPossibleScore()));
    gradeType.setText(grade.getGradeType());
    //JLabel theLabel = new JLabel("Students");
    jlistPanel = new JPanel(border3);
    jlistPanel.setBorder(BorderFactory.createTitledBorder("List of Scores"));
    jlistPanel.add(new JScrollPane(theJList));//, BorderLayout.SOUTH);
    masterPanel = new JPanel(new GridLayout(1, 2));
    masterPanel.setBorder(BorderFactory.createLineBorder(Color.black));
    // masterPanel.add(Box.createHorizontalStrut(10));
    masterPanel.add(infoPanel);
    // masterPanel.add(Box.createHorizontalStrut(10));
    masterPanel.add(jlistPanel);
    // masterPanel.add(Box.createHorizontalStrut(10));
    BorderLayout border = new BorderLayout();
    this.getContentPane().setLayout(border);
    Container theContainer = this.getContentPane();
    theContainer.add(buttonPanel,BorderLayout.SOUTH);
    theContainer.add(masterPanel, BorderLayout.CENTER);
    // now add the event handlers for the buttons
    AddHandler handleAdd = new AddHandler();
    ModifyHandler handleModify = new ModifyHandler();
    RemoveHandler handleRemove = new RemoveHandler();
    add.addActionListener(handleAdd);
    modify.addActionListener(handleModify);
    remove.addActionListener(handleRemove);
    // add the event handler for the window events
    WindowHandler handleWindow = new WindowHandler();
    this.addWindowListener(handleWindow);
    setSize(600,300);
    * Insert the method's description here.
    * Creation date: (2/24/03 4:20:07 PM)
    * @param v com.sun.java.util.collections.Vector
    public void setStudentGrades(Vector v) {
    studentGrades = v;
    DefaultListModel model = (DefaultListModel) theJList.getModel();
    model.removeAllElements();
    int size = v.size();
    for (int i = 0; i < size; i++) {
    model.addElement(v.get(i));
    score.setText("");
    possibleScore.setText("");
    gradeType.setText("");
    setVisible(true);
    // CODE2 StudentSystem
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.event.*;
    import java.awt.*;
    * UsingJLists.java
    * This is a sample program for the use of JLists. You can add a student by entering their
    * information a clicking on add. You can remove a student by entering their information and
    * clicking on remove. They must be in the list to be removed. You can modify a student by
    * entering their information and clicking add. You will be asked for the new student
    * information when using modify. The add and remove buttons will disappear when modifying
    * is underway and the new information is being collected for updating.
    * @author Delmarie
    public class StudentSystem extends JFrame {
    StudentGradeBook studentGradeBook = new StudentGradeBook();
    GradeSystem gradeSystem = new GradeSystem(this, true);
    JButton add, modify, remove, bGrade;
    JList theJList;
    JPanel buttonPanel, textPanel, labelPanel, masterPanel, jlistPanel, infoPanel;
    JTextField name, address, email, phone, courseName, courseDescription;
    JLabel label1, label2, label3;
    StudentSystem tempObjectRef; // used to hold a class level reference to object for dispose
    boolean getStudentInfo = false;
    int saveIndexInObject;
    public class ModifyHandler implements ActionListener {
    public void actionPerformed(java.awt.event.ActionEvent actionEvent) {
    // get the information for the student to modify
    String studentName = name.getText();
    String studentAddress = address.getText();
    String studentEmail = email.getText();
    if (!getStudentInfo) {  // set up to get student info
    // find the correct element of the model to remove and save in class variable
    int removeIndex = -1;
    DefaultListModel model = (DefaultListModel) theJList.getModel();
    for (int i = 0; i < model.size(); i++) {
    String temp = (String) model.elementAt(i);
    if (temp.equals(name.getText())) {
    removeIndex = i;
    break;
    saveIndexInObject = removeIndex;
    if (removeIndex == -1) return;
    // change the text on the border of the info box
    infoPanel.setBorder(BorderFactory.createTitledBorder("Enter new Student Info"));
    // set up to get the modified info and remove some of the buttons
    getStudentInfo = true;
    buttonPanel.removeAll();
    buttonPanel.add(modify);
    buttonPanel.add(bGrade);
    buttonPanel.repaint();
    else { 
    // reset the border and change the element at the provided index (from if above)
    getStudentInfo = false;
    infoPanel.setBorder(BorderFactory.createTitledBorder("Student Information"));
    DefaultListModel model = (DefaultListModel) theJList.getModel();
    model.setElementAt(name.getText(), saveIndexInObject);
    Student student = studentGradeBook.findStudent(saveIndexInObject);
    student.setName(name.getText());
    student.setAddress(address.getText());
    student.setEmail(email.getText());
    student.setPhone(phone.getText());
    student.setCourseName(courseName.getText());
    student.setCourseDescription(courseDescription.getText());
    // clear the textboxes
    name.setText("");
    address.setText("");
    email.setText("");
    phone.setText("");
    courseName.setText("");
    courseDescription.setText("");
    // restore all of the buttons
    buttonPanel.removeAll();
    buttonPanel.add(add);
    buttonPanel.add(modify);
    buttonPanel.add(remove);
    buttonPanel.add(bGrade);
    buttonPanel.repaint();
    public class RemoveHandler implements ActionListener {
    public void actionPerformed(java.awt.event.ActionEvent actionEvent) {
    // get the student info from the text boxes
    String studentName = name.getText();
    String studentAddress = address.getText();
    String studentEmail = email.getText();
    // find the element to remove by name (you could use email address etc also)
    int removeIndex = -1; // = theJList.getSelectedIndex();
    DefaultListModel model = (DefaultListModel) theJList.getModel();
    for (int i = 0; i < model.size(); i++) {
    String temp = (String) model.elementAt(i);
    if (temp.equals(name.getText())) {
    removeIndex = i;
    break;
    if (removeIndex == -1) return;
    // remove the element at the index from the for loop
    model.removeElementAt(removeIndex);
    Student student = studentGradeBook.findStudent(removeIndex);
    studentGradeBook.removeStudent(student);
    // clear the textboxes
    name.setText("");
    address.setText("");
    email.setText("");
    phone.setText("");
    courseName.setText("");
    courseDescription.setText("");
    public class AddHandler implements ActionListener {
    public void actionPerformed(java.awt.event.ActionEvent actionEvent) {
    // get the student info from the text boxes
    String studentName = name.getText();
    String studentAddress = address.getText();
    String studentEmail = email.getText();
    String studentPhone = phone.getText();
    String studentCourseName = courseName.getText();
    String studentCourseDescription = courseDescription.getText();
    // get the model and add the student to the model
    studentGradeBook.addStudent(studentName, studentAddress, studentEmail, studentPhone,
    studentCourseName, studentCourseDescription);
    DefaultListModel model = (DefaultListModel) theJList.getModel();
    model.addElement(studentName);
    // reset the text boxes
    name.setText("");
    address.setText("");
    email.setText("");
    phone.setText("");
    courseName.setText("");
    courseDescription.setText("");
    public class WindowHandler extends WindowAdapter {
    public void windowClosing(WindowEvent e) {
    gradeSystem.dispose();
    tempObjectRef.dispose();
    System.exit(0);
    /** Creates a new instance of UsingJLists */
    public StudentSystem() {
    // create all of the components, put them in panels, and put the panels in JFrame
    add = new JButton("Add");
    modify = new JButton("Modify");
    remove = new JButton("Remove");
    bGrade = new JButton("Grades");
    name = new JTextField("");
    name.setColumns(10);
    address = new JTextField("");
    email = new JTextField("");
    phone = new JTextField("");
    courseName = new JTextField("");
    courseDescription = new JTextField("");
    label1 = new JLabel("name");
    label2 = new JLabel("address");
    label3 = new JLabel("email");
    JLabel label4 = new JLabel("phone");
    JLabel label5 = new JLabel("courseName");
    JLabel label6 = new JLabel("courseDescription");
    FlowLayout flow = new FlowLayout();
    FlowLayout flow1 = new FlowLayout();
    FlowLayout flow2 = new FlowLayout();
    GridLayout grid1 = new GridLayout(13,1);
    GridLayout grid2 = new GridLayout(13,1);
    BorderLayout border3 = new BorderLayout();
    buttonPanel = new JPanel(flow);
    buttonPanel.add(add);
    buttonPanel.add(modify);
    buttonPanel.add(remove);
    buttonPanel.add(bGrade);
    bGrade.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent evt) {
    int index = theJList.getSelectedIndex();
    if (index == -1) return;
    Student student = studentGradeBook.findStudent(index);
    gradeSystem.setStudentGrades(student.getStudentGrades());
    labelPanel = new JPanel(grid1);
    //labelPanel.setBorder(BorderFactory.createLineBorder(Color.black));
    labelPanel.add(Box.createVerticalStrut(20));
    labelPanel.add(label1);
    labelPanel.add(Box.createVerticalStrut(20));
    labelPanel.add(label2);
    labelPanel.add(Box.createVerticalStrut(20));
    labelPanel.add(label3);
    labelPanel.add(Box.createVerticalStrut(20));
    labelPanel.add(label4);
    labelPanel.add(Box.createVerticalStrut(20));
    labelPanel.add(label5);
    labelPanel.add(Box.createVerticalStrut(20));
    labelPanel.add(label6);
    labelPanel.add(Box.createVerticalStrut(20));
    textPanel = new JPanel(grid2);
    //textPanel.setBorder(BorderFactory.createLineBorder(Color.black));
    textPanel.add(Box.createVerticalStrut(20));
    textPanel.add(name);
    textPanel.add(Box.createVerticalStrut(20));
    textPanel.add(address);
    textPanel.add(Box.createVerticalStrut(20));
    textPanel.add(email);
    textPanel.add(Box.createVerticalStrut(20));
    textPanel.add(phone);
    textPanel.add(Box.createVerticalStrut(20));
    textPanel.add(courseName);
    textPanel.add(Box.createVerticalStrut(20));
    textPanel.add(courseDescription);
    textPanel.add(Box.createVerticalStrut(20));
    infoPanel = new JPanel(new FlowLayout());
    infoPanel.setBorder(BorderFactory.createTitledBorder("Student Information"));
    infoPanel.add(Box.createHorizontalStrut(10));
    infoPanel.add(textPanel);
    infoPanel.add(Box.createHorizontalStrut(10));
    infoPanel.add(labelPanel);
    infoPanel.add(Box.createHorizontalStrut(10));
    theJList = new JList(new DefaultListModel());
    theJList.addListSelectionListener(new javax.swing.event.ListSelectionListener(){
    public void valueChanged(ListSelectionEvent evt) {
    int index = theJList.getSelectedIndex();
    if (index == -1) return;
    Student student = studentGradeBook.findStudent(index);
    name.setText(student.getName());
    address.setText(student.getAddress());
    email.setText(student.getEmail());
    phone.setText(student.getPhone());
    courseName.setText(student.getCourseName());
    courseDescription.setText(student.getCourseDescription());
    //JLabel theLabel = new JLabel("Students");
    jlistPanel = new JPanel(border3);
    jlistPanel.setBorder(BorderFactory.createTitledBorder("List of Students"));
    jlistPanel.add(new JScrollPane(theJList), BorderLayout.SOUTH);
    masterPanel = new JPanel(flow1);
    masterPanel.setBorder(BorderFactory.createLineBorder(Color.black));
    masterPanel.add(Box.createHorizontalStrut(10));
    masterPanel.add(infoPanel);
    masterPanel.add(Box.createHorizontalStrut(10));
    masterPanel.add(jlistPanel);
    masterPanel.add(Box.createHorizontalStrut(10));
    BorderLayout border = new BorderLayout();
    this.getContentPane().setLayout(border);
    Container theContainer = this.getContentPane();
    theContainer.add(buttonPanel,BorderLayout.SOUTH);
    theContainer.add(masterPanel, BorderLayout.NORTH);
    // now add the event handlers for the buttons
    AddHandler handleAdd = new AddHandler();
    ModifyHandler handleModify = new ModifyHandler();
    RemoveHandler handleRemove = new RemoveHandler();
    add.addActionListener(handleAdd);
    modify.addActionListener(handleModify);
    remove.addActionListener(handleRemove);
    // add the event handler for the window events
    WindowHandler handleWindow = new WindowHandler();
    this.addWindowListener(handleWindow);
    // make the frame visible and set its size and show it.
    this.setVisible(true);
    this.pack();//setSize(600,300);
    this.show();
    public static void main (String [] args) {
    StudentSystem mainObject = new StudentSystem();
    mainObject.setTempObjectRef(mainObject);
    public void setTempObjectRef(StudentSystem obj) {
    // set up a reference to this object for use in closing the window method dispose
    tempObjectRef = obj;
    // CODE 3 Student
    import java.util.*;
    * Insert the type's description here.
    * Creation date: (2/24/03 11:23:58 AM)
    * @author: Delmarie
    public class Student {
    private String name, address, phone, email, courseName, courseDescription;
    private Vector studentGrades;
    * Student constructor comment.
    public Student() {
    studentGrades = new Vector();
    * Insert the method's description here.
    * Creation date: (2/24/03 11:39:56 AM)
    * @param score double
    * @param possibleScore double
    * @param gradeType java.lang.String
    public void addGrade(double score, double possibleScore, String gradeType) {
    Grade g = new Grade();
    g.setScore(score);
    g.setPossibleScore(possibleScore);
    g.setGradeType(gradeType);
    studentGrades.add(g);
    * Insert the method's description here.
    * Creation date: (2/24/03 11:47:01 AM)
    * @return Grade
    * @param index int
    public Grade findGrade(int index) {
    return (Grade)studentGrades.get(index);
    * Insert the method's description here.
    * Creation date: (2/24/03 11:28:57 AM)
    * @return java.lang.String
    public java.lang.String getAddress() {
    return address;
    * Insert the method's description here.
    * Creation date: (2/24/03 11:28:57 AM)
    * @return java.lang.String
    public java.lang.String getCourseDescription() {
    return courseDescription;
    * Insert the method's description here.
    * Creation date: (2/24/03 11:28:57 AM)
    * @return java.lang.String
    public java.lang.String getCourseName() {
    return courseName;
    * Insert the method's description here.
    * Creation date: (2/24/03 11:28:57 AM)
    * @return java.lang.String
    public java.lang.String getEmail() {
    return email;
    * Insert the method's description here.
    * Creation date: (2/24/03 11:48:03 AM)
    * @return java.util.Iterator
    public Iterator getGradeIterator() {
    return studentGrades.iterator();
    * Insert the method's description here.
    * Creation date: (2/24/03 11:28:57 AM)
    * @return java.lang.String
    public java.lang.String getName() {
    return name;
    * Insert the method's description here.
    * Creation date: (2/24/03 11:28:57 AM)
    * @return java.lang.String
    public java.lang.String getPhone() {
    return phone;
    * Insert the method's description here.
    * Creation date: (2/25/03 10:56:13 AM)
    * @return java.util.Vector
    public java.util.Vector getStudentGrades() {
    return studentGrades;
    * Insert the method's description here.
    * Creation date: (2/24/03 11:41:52 AM)
    * @param grade Grade
    public void removeGrade(Grade grade) {
    studentGrades.remove(grade);
    * Insert the method's description here.
    * Creation date: (2/24/03 11:28:57 AM)
    * @param newAddress java.lang.String
    public void setAddress(java.lang.String newAddress) {
    address = newAddress;
    * Insert the method's description here.
    * Creation date: (2/24/03 11:28:57 AM)
    * @param newCourseDescription java.lang.String
    public void setCourseDescription(java.lang.String newCourseDescription) {
    courseDescription = newCourseDescription;
    * Insert the method's description here.
    * Creation date: (2/24/03 11:28:57 AM)
    * @param newCourseName java.lang.String
    public void setCourseName(java.lang.String newCourseName) {
    courseName = newCourseName;
    * Insert the method's description here.
    * Creation date: (2/24/03 11:28:57 AM)
    * @param newEmail java.lang.String
    public void setEmail(java.lang.String newEmail) {
    email = newEmail;
    * Insert the method's description here.
    * Creation date: (2/24/03 11:28:57 AM)
    * @param newName java.lang.String
    public void setName(java.lang.String newName) {
    name = newName;
    * Insert the method's description here.
    * Creation date: (2/24/03 11:28:57 AM)
    * @param newPhone java.lang.String
    public void setPhone(java.lang.String newPhone) {
    phone = newPhone;
    * Insert the method's description here.
    * Creation date: (2/25/03 10:56:13 AM)
    * @param newStudentGrades java.util.Vector
    public void setStudentGrades(Vector newStudentGrades) {
    studentGrades = newStudentGrades;
    //CODE 4 StudentGradeBook
    import java.util.*;
    * Insert the type's description here.
    * Creation date: (2/24/03 11:50:35 AM)
    * @author: delmarie
    public class StudentGradeBook {
    private Vector allStudents;
    * StudentGradeBook constructor comment.
    public StudentGradeBook() {
    allStudents = new Vector();
    * Insert the method's description here.
    * Creation date: (2/24/03 11:54:01 AM)
    * @param name java.lang.String
    * @param address java.lang.String
    * @param email java.lang.String
    * @param phone java.lang.String
    public void addStudent(String name, String address, String email, String phone) {
    Student student = new Student();
    student.setName(name);
    student.setAddress(address);
    student.setEmail(email);
    student.setPhone(phone);
    allStudents.add(student);
    * Insert the method's description here.
    * Creation date: (2/24/03 11:54:01 AM)
    * @param name java.lang.String
    * @param address java.lang.String
    * @param email java.lang.String
    * @param phone java.lang.String
    public void addStudent(String name, String address, String email, String phone,
    String courseName, String courseDescription) {
    Student student = new Student();
    student.setName(name);
    student.setAddress(address);
    student.setEmail(email);
    student.setPhone(phone);
    student.setCourseName(courseName);
    student.setCourseDescription(courseDescription);
    allStudents.add(student);
    * Insert the method's description here.
    * Creation date: (2/24/03 12:00:53 PM)
    * @param index Student
    public Student findStudent(int index) {
    return (Student)allStudents.get(index);
    * Insert the method's description here.
    * Creation date: (2/24/03 12:02:43 PM)
    * @return java.util.Iterator
    public Iterator getStudentIterator() {
    return allStudents.iterator();
    * Insert the method's description here.
    * Creation date: (2/24/03 11:59:41 AM)
    * @pa

    First of all, this is an extremely advanced project for someone only having 8 weeks of experience. I'm not sure what the "real story" (e.g., the professor teaching the course majored in Public Speaking, student told counselor that she could handle skipping the preliminary course, student transferring from college that used another language as the core language) is but I'll give you my 2 cents anyway.
    Suggestions:
    I personally would start over keeping the following in mind.
    1.) Write a student class that encapsulates/holds the student's personal information, history of grades, computes average and whatever eles is needed from the student.
    --the history of grades can be stored in any list structure, preferably some sort of array, since all you going to do with them is average them.
    2.) Keep your window display as simple as possible. Basically from my understanding you'll need at a minimum:
    JTextField First_Name, Last_Name, Street_Address, City, State, Zip, Average_Grade;
    You can either have labels for these or fill them in with their respective labels if they are empty.
    JButton New, Average, Add
    I don't know the components name, but I'm sure Java has some sort of drop down list that you will need so you can add students' names to it as they are added.
    The following is a scenario of how this will come together, initially assuming there are no students:
    Your program starts with all the JTextFields containing their repsective labels and grayed out, it's an option or method in JTextField. The drop down list is empty. The teacher has to press the New button, at which time the grayed out text fields become editable. Teacher completes filling out the form and presses the Add button. At this point, your program gathers the information from the text fields (First_Name, Last_Name...) and instantiates or creates a new Student object from your Student class and adds the student name to the drop down list. Now that the new Student object has been created and constructed, you need to store it in you lists structure for later retrieval or writing to disk later.
    Now there is a student in the database. So the teacher comes along and wants to average Davey's grades. The teacher goes to the dropdown list and selects Davey's name, which triggers an event in you program. You retrieve the name of the student from your window's drop down list, pull the Student record from your list structure, ask it for the average grade and populate the other text fields in your window with the records information (First_Name, Last_Name, Address...). The Average_Grade text field is made editable and the value of getAverage from the Student object is inserted. The chain of envents keep rolling much in the same manner.
    If you made it this far and much of what I said is confusing, then I believe you are in over your head and I'm sorry. If much of what I said sounds similar to what you have or at least you understand a majority of what I said, then let me comment on where you started going awry.
    Regarding this project, I believe you envisioned each chain of events spawning a new window, such as user clicks the New button so your program would spawn a new window titled "Enter new Student Information."
    You can represent all the task and modes required in this project using a single window display by manipulating the components within the window. If you are looking at a window and suddenly a text box is grayed out, the program is sending a signal to you that its mode has changed.
    I hope this helps and good luck.

  • When typing text. My IPad keeps inserting full stops followed by  a  Cap letter. Also   Back arrow, when tapped once,  goes back quickly. And deletes everything that I have. Just typed.Would appreciate your help..

    SUddenly, when typing text on my IPad, full stops followed by a capital letter. Keep occurring. Also when I tap the back erase. Arrow, everything that I have previously. Typed gets erased. Would love some help with this, have looked in settings but none the wiser. Thanks.

    Do yo have the "." shortcut set to On? (Settings>General>Keyboard). If you do, it may be that you are hitting the space bar twice without realizing it. This will insert a period.

  • Does anyone knows which cable is used to connect an iphone to a radio or speakers? would appreciate your help..

    I have an iphone 5 and i would like to connect it to a radio or speakers to play music but i dont know which cable is used and where can i get it.

    Depends on the home radio. You can connect a 3.5mm jack to the iPhone and, if your radio has a 3.5mm input, connect that to your radio. If your radio only has RCA style connectors, you can buy an adapter like the one pictured.
    Regardless of which method you use, make sure to select the correct input on your radio. You'll also need to turn the volume on your iPhone all the way up.
    I hope that makes sense. If not, what's the model of your radio?

  • Would appreciate your help - my Contacts does not sync into Desktop, it freezes

    Can anyone help me?
    From my Zire31 I sync with a USB cable into Palm desktop.
    The Contacts used to sync allright, but now it does not at all. Other things [memos etc.] do sync, but when the process gets to contacts, it freezes on "syncronizing contacts" on both Desktop and Zire, and stays like that for hours untill I reset!
    I tried sevaral settings with the Hotsync manager but none help.
    Would be thankfull fro your advice.
    Zam
    Post relates to: Zire 31

    Thank you, HardbeatZ. I did what you suggested and the software found 6 possibly corrupted files, all of them in the calender, none in the contacts.
    Do you know how I should proceed?
    Zam
    Post relates to: Zire 31
    Message Edited by zam on 07-29-2008 11:05 PM

  • VMA fairly urgent, would appreciate your help VCAP is tomorrow.

    Hi All,
    I Would be eternally grateful if anyone had any advice on this problem.  I have installed and configured a new instance of the vMA, added it on the domain, added target servers however I don't seem to be able to run anything against hosts resxtop for example.  It doesn't seem to matter if I run it with local credentials or AD nada! the prompt just bounces back at me.  I know the credentials are correct for everything I have tried, I have confirmed system time, tried both American keyboard/UK, rebooted the box I know DNS is ok and have tried IP's regardless.  Its a long shot but if anyone could take a look at the attached screenshot and let me know if I am doing something silly I would be grateful.  I really want to nail this as its in my VCAP tomorrow, I feel like I know the relevant commands but want to actually test it.

    Well that fixed it!!!  What the fluffing hell was that all about, hope I don't have to contend with that sort of rubbish in the actual exam?  How did that sort it mate?  What was wrong is it a known issue/bug or am I a muppet?

  • I have no idea how to use Firefox. I used to have Internet Explorer 7 but am unable to connect to it anymore. How do I use Firefox? I know how to use a computer, somewhat, but am not as savy as I'd like to be. I will appreciate your help.

    I have no idea how to use Firefox. I used to have Internet Explorer 7 but am unable to connect to it anymore. How do I use Firefox? I know how to use a computer, somewhat, but am not as good at it as I'd like to be. I will appreciate your help.

    You can look at this post in this MozillaZine forum thread about inspecting a sessionstore file and possibly extract URLs.
    *http://forums.mozillazine.org/viewtopic.php?f=38&p=12098147&start=60#p12098147
    You can open the Browser Console (Firefox/Tools > Web Developer).
    Paste the JavaScript code in the command line and press the Enter key to run the code.
    *Toggle the devtools.chrome.enabled pref on the <b>about:config</b> page to true to enable the command line
    *https://developer.mozilla.org/Tools/Browser_Console#Browser_Console_command_line

  • Hi, I'm unable to use my speaker when I'm using Mac OS. However, I'm able to do so for Windows 7 OS on Bootcamp. Can anyone please advise on how to rectify this problem? I would greatly appreciate your help, thank you.

    Hi, I'm unable to use my speaker when I'm using Mac OS, which means I'm unable to unmute, decrease or increase the volume. However, I'm able to do so for Windows 7 OS on Bootcamp. Can anyone please advise on how to rectify this problem? I would greatly appreciate your help, thank you.

    Hi Zac, sorry to hear about your troubles, but that's why us other users are here to try to help in these instances.
    Open Console in Utilities & see if there are any clues or repeating messages when this connection drop happens.

  • I'm new to Mac and I have a Mac Mini. Could you please tell me how I could paste an URL to a video downloader like "Coolmuster Video Downloader for Mac"? I can copy the url but I could not paste it on the downloader. I appreciate your help to my problem.

    I'm new to Mac and I have a Mac Mini. Could you please tell me how I could paste an URL to a video downloader like "Coolmuster Video Downloader for Mac"? I can copy the url but I could not paste it on the downloader. I appreciate your help to my problem.

    Is this happing because the external is formatted to PC and not mac?
    Yes that is correct.
    Will I need to get a mac external hard drive if I wish to continue to save my documents like this?
    If you no longer use a PC you could format this drive for the Mac. However be aware that formatting a drive will erase all the data on it. So you would need someplace to copy the data off this drive to while you did the re-format and then you could copy the data back.
    You could get another drive, format it for the Mac and copy the data to it. Then re-format the original drive and use it as a backup drive. Always good to have backups.
    Post back with the drive type and size of the current drive, if you are doing backups now and how and if you still need to access this drive from a PC.
    regards

  • TS1424 I purchased and downloaded a book in iBooks.  I read about 16 chapters.  The next time I opened the app to read the book, no words loaded on the pages.  It would go to the table of contents, but not to pages in chapters.  Any ideas?

    I purchased and downloaded a book in iBooks.  I read about 16 chapters.  The next time I opened the app to read the book, no words loaded on the pages.  It would go to the table of contents, but not to pages in chapters.  Any ideas?

    Try to reset your phone, hold the home/sleep buttons until it reboots and the apple logo appears, don't release the buttons till apple logo appears.  If no luck there, Resync the book.  Or delete it and redownload it.  Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • Where do I continue; I have a '07 Macbook Pro, and would truly appreciate your help as I freshly install my osx beginning with my original 10.4

    Please...
    Where do I continue; I have a '07 Macbook Pro, and would truly appreciate your help as I have freshly installed my osx beginning with my original 10.4
    Thank you
    PS
    I should mention; for reasons unknown to me, I no longer have use of my disk drive since reinstalling 10.4.

    You can use software update to install the latest version of Tiger.  If you connect an external DVD drive you can install an upgrade to Snow Leopard.  The disk is available at the Apple online store:
    http://store.apple.com/us/product/MC573Z/A/mac-os-x-106-snow-leopard
    Further upgrades are dependent upon the EXACT model of your MBP.
    Ciao.

  • My iPod touch won't turn on. I have tried plugging it in to charge, but and the screen remains black. I have tried restarting/resetting it to no avail. I would really appreciate your help. Thank you.

    My iPod touch won't turn on. I have tried plugging it in to charge, but and the screen remains black. I have tried restarting/resetting it to no avail. I would really appreciate your help. Thank you.

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable       
    - Try on another computer                            
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar                                     

Maybe you are looking for

  • How to down grade compressor 4.1.2

    how do you down grade compressor 4.1.2 to previous version

  • Mac Mini vs Mac Mini Server

    Hi I'm a Logic Pro User on a Late 2011 MBP. Wanting to switch to a Mac Mini or a MacMini Server Any reason why I should rather go for the Server option? Presumably if I did I could in theory have 3 macs connected to the MMS with all 3 users using Log

  • Manage multiple Skype Manager accounts

    I am already the administrator of a Skype manager account but i want to set up another Skype manager account for another company I control using my existing skype profile? is this possibile? If that is not clear, then what I want to achieve is to hav

  • Java Focus on Application windows

    Greetings all, I would like to be able to detect any windows focus change on my desktop in java. Say I have 2 applications, app1 and app2 that are window-based application running on windows. What my program should do is run as a background process t

  • What is this CPU activity?

    I have been having trouble with the SBBOD when I'm in Mail.  A few days ago I completely reinstalled my OS X 10.8.4 and I'm still having problems.  Last night I started watching my Activity Monitor.  This morning I only had Mail open and everything s