• Post Reply Bookmark Topic Watch Topic
  • New Topic

movie management  RSS feed

 
fleur flower
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello
my final project of JAVA is about "movie management system"

i have to create GUI linked to a database; i worked on the project but i still have errors to run it.

here is a part of the code i have errors and i would like to have your help on it)

import java.awt.*;
import java.awt.event.*;
import java.sql.*;
import javax.swing.*;

public class ControlPanel extends JPanel {
private JButton findName, addName,
updateName, clear, help;

public ControlPanel( Connection c, ScrollingPanel s,
JTextArea t )
{
setLayout( new GridLayout( 1, 5 ) );

findName = new JButton( "Find" );
findName.addActionListener( new FindRecord( c, s, t ) );
add( findName );

addName = new JButton( "Add" );
addName.addActionListener( new AddRecord( c, s, t ) );
add( addName );

updateName = new JButton( "Update" );
updateName.addActionListener(
new UpdateRecord( c, s, t ) );
add( updateName );

clear = new JButton( "Clear" );
clear.addActionListener( new ClearFields( s ) );
add( clear );

help = new JButton( "Help" );
help.addActionListener( new Help( t ) );
add( help );
}
}



errors:import java.awt.*;
import java.awt.event.*;
import java.sql.*;
import javax.swing.*;

public class ControlPanel extends JPanel {
private JButton findName, addName,
updateName, clear, help;

public ControlPanel( Connection c, ScrollingPanel s,
JTextArea t )
{
setLayout( new GridLayout( 1, 5 ) );

findName = new JButton( "Find" );
findName.addActionListener( new FindRecord( c, s, t ) );
add( findName );

addName = new JButton( "Add" );
addName.addActionListener( new AddRecord( c, s, t ) );
add( addName );

updateName = new JButton( "Update" );
updateName.addActionListener(
new UpdateRecord( c, s, t ) );
add( updateName );

clear = new JButton( "Clear" );
clear.addActionListener( new ClearFields( s ) );
add( clear );

help = new JButton( "Help" );
help.addActionListener( new Help( t ) );
add( help );
}
}

error: clas HELP not found in class controlPanel


thank you
 
Campbell Ritchie
Marshal
Posts: 56578
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fleur Flower? You had better change the name before the Sheriffs find out . . .

And you ought to call your missing Help class HelpListener. All Listener classes ought to include the word Listener.

If it says it can't find the class Help, that is what it means. Have you imported it correctly? Is it in the same package? Is it a private class inside another class? All these unanswered questions, which will probably sort out your problem.

CR
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!