请问cannot resolve symbol的一个问题
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import ch08.Time3;
public class TimeTest5 extends JApplet implements ActionListener{
private Time3 time;
private JLabel hourLabel, minuteLabel, secondLabel;
private JTextArea hourField, minuteField, secondField, displayField;
private JButton tickButton;
public void init()
{
time = new Time3();
Container container = getContenPane();
container.setLayout( new FlowLayout() );
hourLabel = new JLabel( "Set Hour" );
hourField = new JTextArea( 10 );
hourField.addActionListener( this );
container.add( hourLabel );
container.add( hourField );
minuteLabel = new JLabel( "Set minute" );
minuteField = new JTextArea( 10 );
minuteField.addActionListener( this );
container.add( minuteLabel );
container.add( minuteField );
secondLabel = new JLabel( "Set second" );
secondField = new JTextArea( 10 );
secondField.addActionListener( this );
container.add( secondLabel );
container.add( secondField );
displayField = new JTextArea( 30 );
displayField.setEditable( false );
container.add( displayField );
tickButton = new JButton( "Add 1 to second" );
tickButton.addActionListener( this );
container.add( tickButton );
updateDisplay();
}
public void actionPerformed( ActionEvent actionEvent )
{
if ( actionEvent.getSource() == tickButton )
tick();
else if ( actionEvent.getSource() == hourField )
{
time.setHour( Integer.parseInt( actionEvent.getActionCommand() ) );
hourField.setText( "" );
}
else if ( actionEvent.getSource() == minuteField )
{
time.setMinute( Integer.parseInt( actionEvent.getActionCommand() ) );
minuteField.setText( "" );
}
else if ( actionEvent.getSource() == secondField )
{
time.setSecond( Integer.parseInt( actionEvent.getActionCommand() ) );
secondField.setText( "" );
}
updateDisplay();
}
public void updateDisplay()
{
displayField.setText( "Hour:" + time.getHour() +
"; Minute: " + time.getMinute() +
"; Second: " + time.getSecond() );
showStatus( "Standard time is: " + time.toString() +
"; Universal time is: " + time.toUniversalString() );
}
public void tick()
{
time.setSecond( (time.getSecond() + 1 ) % 60 );
if ( time.getSecond() == 0 )
{
time.setMinute( ( time.getMinute() + 1 ) % 60 );
if ( time.getMinute() == 0 )
time.setHour( ( time.getHour() + 1 ) % 24 );
}
}
}
******************************************
编译时提示错误:
cannot resolve symbol method getContenPane ()
cannot resolve symbol constructor JTextArea (int)
cannot resolve symbol method addActionListener (TimeTest5)
cannot resolve symbol constructor JTextArea (int)
cannot resolve symbol method addActionListener (TimeTest5)
cannot resolve symbol constructor JTextArea (int)
cannot resolve symbol method addActionListener (TimeTest5)
cannot resolve symbol constructor JTextArea (int)
**********************************************
ch08.Time3 是自定义的包
sdk安装在D盘 编写的程序和自定义的包在E盘
设置过环境变量
其它没有 import 自定义包 的程序都能正确编译和执行
不知是怎么回事?