I'm trying to write a program that reads a line for that buffer than open that file. I have already written that program and it open up the file when I enter the directory but it will not open a file when I enter in a line form that file. can someone please help!!!!
Here is an sample program to gave you an idea of what I'm doing:
public void actionPerformed (ActionEvent actionEvent ) { File name = new File (actionEvent.getActionCommand() );
if (name.exists() ) { outputArea.setText( name.getName() + " exist\n" + ( name.isFile() ? " is a file\n" : " is not a file\n" ) + ( name.isDirectory() ? " is a directory\n" : " is not a directory\n" ) + ( name.isAbsolute() ? " is absolute path\n" : " is not absolute path\n" ) + "Last modified: " + name.lastModified() + "\nPath: " + name.length() + "\nAbsolute path: " + name.getAbsolutePath() + "\nParent: " + name.getParent() );
if (name.isFile()) { try { BufferedReader input = new BufferedReader( new FileReader( name )); StringBuffer buffer = new StringBuffer(); String text; outputArea.append("\n\n" );