I am getting fails on the first 3 tests of validation. Anyone know why?
package com.codegym.task.task32.task3209.listeners;
import com.codegym.task.task32.task3209.View;
import javax.swing.*;
import javax.swing.event.MenuEvent;
import javax.swing.event.MenuListener;
public class UndoMenuListener implements MenuListener {
View view;
JMenuItem undoMenuItem;
JMenuItem redoMenuItem;
public UndoMenuListener(View view, JMenuItem undoMenuItem, JMenuItem redoMenuItem) {
this.view = view;
this.undoMenuItem = undoMenuItem;
this.redoMenuItem = redoMenuItem;
}
@Override
public void menuSelected(MenuEvent e) {
undoMenuItem.setEnabled(this.view.canUndo());
redoMenuItem.setEnabled(this.view.canRedo());
}
@Override
public void menuDeselected(MenuEvent e) {
}
@Override
public void menuCanceled(MenuEvent e) {
}
}
package com.codegym.task.task32.task3209;
import javax.swing.*;
import javax.swing.text.html.HTMLDocument;
import java.io.File;
public class Controller {
private View view;
private HTMLDocument document;
private File currentFile;
public Controller(View view) {
this.view = view;
}
public static void main(String[] args) throws UnsupportedLookAndFeelException, ClassNotFoundException, InstantiationException, IllegalAccessException {
View view = new View();
Controller controller = new Controller(view);
view.setController(controller);
view.init();
controller.init();
}
public void init(){
}
public void exit(){
System.exit(0);
}
public View getView() {
return this.view;
}
}