two problems I need help
Need solution, thanks!
java:62: cannot find symbol
symbol : variable FileInputStream
location: class ishome
FileInputStream = new FileInputStream(test);
^
java:67: read(java.io.Reader,java.lang.Object) in javax.swing.text.JTextComponent cannot be applied to (java.io.File)
displayArea.read(test);
^
2 errors
import java.awt.*;
import java.awt.event.*;
import java.applet.Applet;
import java.awt.Graphics;
import java.awt.Image;
import java.io.*;
import javax.swing.text.*;
import javax.swing.*;
publicclass ishomeextends Applet{
Button newsButton;
Button projectsButton;
Button issuesButton;
Button learnButton;
Button gamesButton;
Button aboutButton;
Panel panel;
Button helpdeskButton;
Image topBar;
File test;
JTextArea displayArea;
publicvoid init(){
ishomeLayout customLayout =new ishomeLayout();
setFont(new Font("Helvetica", Font.PLAIN, 12));
setLayout(customLayout);
newsButton =new Button("News");
newsButton.addActionListener(new NewsActionListener());
add(newsButton);
projectsButton =new Button("Projects");
//projectsButton.addActionListener(new ProjectsActionListener());
add(projectsButton);
issuesButton =new Button("Issues");
//issuesButton.addActionListener(new issuesActionListener());
add(issuesButton);
learnButton =new Button("Learn");
//learnButton.addActionListener(new LearnActionListener());
add(learnButton);
gamesButton =new Button("Games");
//gamesButton.addActionListener(new GamesActionListener());
add(gamesButton);
aboutButton =new Button("About Us");
//aboutButton.addActionListener(new AboutActionListener());
add(aboutButton);
helpdeskButton =new Button("Help Desk");
//helpdeskButton.addActionListener(new HelpdeskActionListener());
add(helpdeskButton);
displayArea =new JTextArea();
add(displayArea);
topBar = getImage(getCodeBase(),"topBar.jpg");
test =new File("test.txt");
FileInputStream =new FileInputStream(test);
setSize(getPreferredSize());
}
class NewsActionListenerimplements ActionListener{
publicvoid actionPerformed(ActionEvent e){
displayArea.append(test);
}
}
publicvoid paint(Graphics g){
g.drawImage(topBar, 10, 5,this);
}
publicstaticvoid main(String args[]){
ishome applet =new ishome();
Frame window =new Frame("ishome");
window.addWindowListener(new WindowAdapter(){
publicvoid windowClosing(WindowEvent e){
System.exit(0);
}
});
applet.init();
window.add("Center", applet);
window.pack();
window.setVisible(true);
}
}
class ishomeLayoutimplements LayoutManager{
public ishomeLayout(){
}
publicvoid addLayoutComponent(String name, Component comp){
}
publicvoid removeLayoutComponent(Component comp){
}
public Dimension preferredLayoutSize(Container parent){
Dimension dim =new Dimension(0, 0);
Insets insets = parent.getInsets();
dim.width = 687 + insets.left + insets.right;
dim.height = 494 + insets.top + insets.bottom;
return dim;
}
public Dimension minimumLayoutSize(Container parent){
Dimension dim =new Dimension(0, 0);
return dim;
}
publicvoid layoutContainer(Container parent){
Insets insets = parent.getInsets();
Component c;
c = parent.getComponent(0);
if (c.isVisible()){c.setBounds(insets.left+8,insets.top+92,72,24);}
c = parent.getComponent(1);
if (c.isVisible()){c.setBounds(insets.left+8,insets.top+116,72,24);}
c = parent.getComponent(2);
if (c.isVisible()){c.setBounds(insets.left+8,insets.top+140,72,24);}
c = parent.getComponent(3);
if (c.isVisible()){c.setBounds(insets.left+8,insets.top+164,72,24);}
c = parent.getComponent(4);
if (c.isVisible()){c.setBounds(insets.left+8,insets.top+188,72,24);}
c = parent.getComponent(5);
if (c.isVisible()){c.setBounds(insets.left+8,insets.top+212,72,24);}
c = parent.getComponent(6);
if (c.isVisible()){c.setBounds(insets.left+96,insets.top+92,576,392);}
c = parent.getComponent(7);
if (c.isVisible()){c.setBounds(insets.left+8,insets.top+268,72,24);}
c = parent.getComponent(8);
if (c.isVisible()){c.setBounds(insets.left+8,insets.top+268,72,24);}
}
}

