Hi guys!

im wondering if any of you can help me out here. myself and a few others are trying to develop an online book ordering system for a college project. we have designed our applet ( with various buttons ) but we need to be able to link the button objects to an application form to enter details. any ideas on how to do this? the code has to be contained on the one page. we are developing the project in Jbuilder5.

here is the code below.

thanx again for all your help!

DrunkinP

/**
* Title: project
* Description:
* Copyright: Copyright (c) 2005
* Company: college practicals
* @author trish
* @version 1.0
*/
import java.applet.Applet;
import java.awt.event.*;
import java.awt.*;

public class project extends Applet
{
Label label1;
Button buttonEnterDetails;
Button buttonUpdateDetails;
Button buttonContactAdmin;
Button buttonSearchForBook;
Button button1 = new Button();

public void init()
{
setLayout(null);
setBackground(Color.black);
setSize(800, 800); //size of applet in web page

label1 = new Label("Welcome to Books & Buy", Label.CENTER);
//label1.setFont(Font Bold);
label1.setBounds(8,8,280,40);
label1.setBackground(Color.red);
label1.setForeground(Color.white);
add(label1); // add label1 to web page

buttonEnterDetails = new Button();
buttonEnterDetails.setLabel("Enter Details");
buttonEnterDetails.setBounds(8,152,86,32);
buttonEnterDetails.setBackground(Color.red);
buttonEnterDetails.setForeground(Color.white);

add(buttonEnterDetails);

buttonUpdateDetails = new Button();
buttonUpdateDetails.setLabel("Update Details");
buttonUpdateDetails.setBounds(104,152,86,32);
buttonUpdateDetails.setBackground(Color.red);
buttonUpdateDetails.setForeground(Color.white);

add(buttonUpdateDetails);

buttonContactAdmin = new Button();
buttonContactAdmin.setLabel("ContactAdmin");
buttonContactAdmin.setBounds(200,152,86,32);
buttonContactAdmin.setBackground(Color.red);
buttonContactAdmin.setForeground(Color.white);

add(buttonContactAdmin);

buttonSearchForBook = new Button();
buttonSearchForBook.setLabel("Search");
buttonSearchForBook.setBounds(300,152,86,32);
buttonSearchForBook.setBackground(Color.red);
buttonSearchForBook.setForeground(Color.white);

add(buttonSearchForBook);

ButtonListener ourButtonListener = new ButtonListener();
buttonEnterDetails.addActionListener(ourButtonListener);
buttonUpdateDetails.addActionListener(ourButtonListener);
buttonContactAdmin.addActionListener(ourButtonListener);
buttonSearchForBook.addActionListener(ourButtonListener);
}

class ButtonListener implements ActionListener
{
public void actionPerformed(ActionEvent event)
{
Object press = event.getSource();
if(press == buttonEnterDetails)
{
// THIS IS THE PART WHERE WE ARE GETTING PROBLEMS WITH
}}}}