CIT 591 Assignment 9: Text Translator Notes
Fall 2008, David Matuszek

The screenshot shows an Edit menu. It should be a File menu.


Each of the four translators (Identity, etc.) is a class that implements TranslatorInterface.


The Translator class is the main class. It should extend JFrame. If you prefer, it can instead create and use a JFrame (but it's usually easier just to extend JFrame).


The addTranslateItem(TranslatorInterface translator) method is just a GUI building method. It doesn't do anything fancy--for example, it doesn't let the user add menu items to a running program! All it does is:

To add yet another translator (class that implements TranslatorInterface) to the program, all you should have to do is create a new translator of that type, and add a call to addTranslateItem in your GUI building method.

Here's what the "translate" listener does:


The program does only one kind of translation at a time. It does not do all four at once.


Here's the way translation should work.


The purpose of the Wrap Lines translator is to break annoyingly long lines. It should never join two lines.


For my translator,