Notepad simulated with java program