Add a method that will override the processWindowEvent() inherited from the DecoratedFrame class. Place it just above the fileExit_actionPerformed event handler.
/** * Override DecoratedFrame's system close handler */ protected void processWindowEvent(WindowEvent e) { if (e.getID() == WindowEvent.WINDOW_CLOSING) { if (okToAbandon()) { System.exit(0); } } }Congratulations, you now have a functional text editor written in JBuilder!