AddRecord Class - havin trouble with ScrollingPanel

Hi everybody!

I was working on this AddRecord class, unfortunately I keep gettin an error concerning the ScrollingPanel. I'm not really sure what's wrong with it. The errors are:

addrecord.java:9: cannot resolve symbol

symbol : class ScrollingPanel

location: class AddRecord

{private ScrollingPanel fields;

^

addrecord.java:13: cannot resolve symbol

symbol : class ScrollingPanel

location: class AddRecord

public AddRecord(Connection c, ScrollingPanel f, JTextArea o)

^

2 errors

if anyone can gimme a hint of what's wrong.. I'd really appreciate it! Thank ya!

-

import java.awt.*;

import java.awt.event.*;

import java.sql.*;

import javax.swing.*;

public class AddRecord implements ActionListener

{private ScrollingPanel fields;

private JTextArea output;

private Connection connection;

public AddRecord(Connection c, ScrollingPanel f, JTextArea o)

{

connection = c;

fields = f;

output = o;

}

public void actionPerformed(ActionEvent e)

{

try{

Statement statement = connection.createStatement();

if(!fields.last.getText().equals("") &&

!fields.first.getText().equals("")) {

String query = "Insert Student Information( " +

"firstname, lastname, test1, test2, test3, test4, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10" + ") VALUES (' " +

fields.first.getText() + " ', ' " +

fields.last.getText() + " ', ' " +

fields.test1.getText() + " ', ' " +

fields.test2.getText() + " ', ' " +

fields.test3.getText() + " ', ' " +

fields.test4.getText() + " ', ' " +

fields.homework.getText() + " ')";

output.append("\nSending query: " +

connection.nativeSQL(query) + "\n");

int result = statement.executeUpdate(query);

if (result == 1)

output.append("\nInsertion successful\n");

else {

output.append("\nInsertion failed\n");

fields.first.setText(" ");

fields.last.setText(" ");

fields.test1.setText(" ");

fields.test2.setText(" ");

fields.test3.setText(" ");

fields.test4.setText(" ");

fields.a1.setText(" ");

fields.a2.setText(" ");

fields.a3.setText(" ");

fields.a4.setText(" ");

fields.a5.setText(" ");

fields.a6.setText(" ");

fields.a7.setText(" ");

fields.a8.setText(" ");

fields.a9.setText(" ");

fields.a10.setText(" ");

}

}

else

output.append("\nEnter at least first and last name then press Add\n");

statement.close();

}

catch (SQLException sqlex){

sqlex.printStackTrace();

output.append(sqlex.toString() );

}

}

}

[2810 byte] By [Animie] at [2007-9-26 1:22:05]
# 1
hi,i think there is no class as ScrollingPanel in awt and swing. there is ScrollPane and JScrollPane.
dhana101 at 2007-6-29 0:58:38 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 2
Hi,I'm getting the same kind of error... if you do already found an answer, could you pls tell me?tkserico
EricoVasconcelos at 2007-6-29 0:58:38 > top of Java-index,Archived Forums,New To Java Technology Archive...