public class Main extends Application
{
/**
* Uses the ExoplanetFileHandler class to retrieve exoplanet data and displays it.
* @param args
* Not used.
*/
public static void main(String[] args)
{
launch(args);
System.out.println("Testing the exoplanet file.");
// Create the file handle.
File exoplanetsFile = new File("data", "exoplanets.readings");
// Use the readExoplanets static methods to retrieve the data stored in the file.
Telescope telescope = ExoplanetFileHandler.readExoplanets(exoplanetsFile);
if (telescope != null) {
// Output the scan of the telescope.
System.out.println(telescope.scan());
} else {
System.out.println("Could not load the telescope. Therefore, cannot display exoplanet data.");
}
}
@Override
public void start(Stage arg0) throws Exception {
// TODO Auto-generated method stub
//arg0.setScene(null);
arg0.show();
}
}