ta prvni cast vypada asi nejak takhle

Kód:
import java.awt.*;        // uziv rozhrani, a graf okna
import java.awt.event.*;  
import javax.swing.*;     
import java.util.*;      

public class Morse extends JFrame {

   //JButton exitButton;
   JLabel label;

   JTextField input;

   JTextArea output;

   String text = "";

   //String morse = "";

   char index;

  //finalni  pole s ekvivalentnimi znaky pro a-z	

   public static final String[] morseAlpha = {".-", "-...", "-.-.", "-..", ".", "..-.",            
					      "--.", "....", "..", ".---", "-.-", ".-..",          
					      "--", "-.", "---", ".--.", "--.-", ".-.", "...",     
					      "-", "..-", "...-", ".--", "-..-", "-.--", "--.."};  
   //finalni pole pro cislice od 0-9

   public static final String[] morseNumeric = {"-----", ".----", "..---", "...--", "....-", 
						".....", "-....", "--...", "---..", "---."};                  
   public Morse(){

      //zavola JFrame s titulkem  
      super( "Konvertor Morseovi abecedy - Jiří Horálek" );

      Container container = getContentPane();

      container.setLayout( new FlowLayout( FlowLayout.LEFT, 10, 14 ) );

      label = new JLabel( "Vložte text k převedeni a stiskněte ENTER:");

      container.add( label );

      input = new JTextField( 29 );

      input.setFont( new Font( "Monospace", Font.PLAIN, 14 ) );

      input.addActionListener(

      new ActionListener() {      

      public void actionPerformed( ActionEvent event ){

       output.setText( "" );

       String text = input.getText().toUpperCase();

          for &#40;int i = 0; i < text.length&#40;&#41;; i++&#41;&#123;

              index = text.charAt&#40; i &#41;;

              if &#40; Character.isDigit&#40; index &#41; &#41;&#123;

                 //vraci index - 48 &#40; 0=48, 9=57 &#41;
                 output.append&#40; morseNumeric&#91; index - 48 &#93; + " " &#41;;
	      &#125;	
              else if &#40; Character.isLetter&#40; index &#41; &#41;&#123;

                 //vraci index - 65 &#40; A=65 , Z=90 &#41;
                 output.append&#40; morseAlpha&#91; index - 65 &#93; + " " &#41;;
              &#125;        		
              else if &#40; index == ' '&#41;&#123; //pokud na vstupu mezera tak vrat 3
				
                 output.append&#40; "   " &#41;; //vrati tri mezery
	      &#125;
       &#125;

       output.append&#40; "\n" &#41;;           
      &#125; 

    &#125; 

  &#41;; 
                  
  container.add&#40; input &#41;;

  output = new JTextArea&#40; 10, 48 &#41;;

  output.setFont&#40; new Font&#40; "Monospace", Font.BOLD, 14 &#41; &#41;;
 
  output.setEditable&#40; false &#41;;

  container.add&#40; new JScrollPane&#40; output &#41; &#41;;

  setSize&#40; 420, 300 &#41;;  

  setVisible&#40; true &#41;;   

  output.setText&#40; "" &#41;;

  &#125;

 public static void main&#40; String args&#91;&#93; &#41; &#123;

		Morse application = new Morse&#40;&#41;;

		application.setDefaultCloseOperation&#40; JFrame.EXIT_ON_CLOSE &#41;;

 &#125;
&#125;
HashTable jsem nikdy nepouzival