I am having errors when I call LoadInput() function…
private void loadInput() {
String fn;
FileDialog fd= new FileDialog((Frame)this.getParent(), "Load RS-274D/X file...", FileDialog.LOAD);
fd.setVisible(true);
fn = fd.getFile();
if (fn != null)
readInput(fn);
}
And here is an exception:
Exception in thread "AWT-EventQueue-1" java.lang.Error: Unresolved compilation problem:
The constructor FileDialog(RS274X, String, int) is undefined
at RS274X.loadInput(RS274X.java:251)
at RS274X.actionPerformed(RS274X.java:165)
The error clearly tells you your FileDialog class doesn’t have a constructor for:
Make sure your class contains the constructor you need and that you send the right parameters when creating the object.