// Path: OnlineTranslator/src/main/java/translator/data/Language.java
// public class Language {
//     private final String description;
//     private final String language;
// 
//     Language(String _desc, String _lang) {
//         this.description = _desc;
//         this.language = _lang;
//     }
// 
//     public String getLanguage() {
//         return language;
//     }
// 
//     public String toString() {
//         return description;
//     }
// }
// 
// Path: OnlineTranslator/src/main/java/translator/data/Translator.java
// public interface Translator {
// 
//     String translate(String text, String from, String to);
// 
//     Language[] getLanguages();
// }
// 
// Path: OnlineTranslator/src/main/java/translator/data/TranslatorFactory.java
// public class TranslatorFactory {
//     public static Vector<Translator> getTranslators() {
//         Vector<Translator> translators = new Vector<>();
//         translators.add(new Tureng());
//         translators.add(new Seslisozluk());
//         return translators;
//     }
// }


import translator.data.Language;
import translator.data.Translator;
import translator.data.TranslatorFactory;
import javax.swing.*;
import java.awt.*;
        jContentPane.add(cmbService);

        JTextArea txtText = new JTextArea();
        JScrollPane pane = new JScrollPane(txtText);
        pane.setBounds(5, 30, 780, 75);
        jContentPane.add(pane);

        JLabel lblTranslatedText = new JLabel();
        JScrollPane pane1 = new JScrollPane(lblTranslatedText);
        pane1.setBounds(new Rectangle(5, 110, 780, 450));
        jContentPane.add(pane1);

        JButton btnTranslate = new JButton();
        btnTranslate.setBounds(620, 5, 165, 20);
        btnTranslate.setText("Translate");
        btnTranslate.setMnemonic('T');
        btnTranslate.addActionListener(e -> {
            String from = cmbFrom.getItemAt(cmbFrom.getSelectedIndex()).getLanguage();
            String to = cmbTo.getItemAt(cmbTo.getSelectedIndex()).getLanguage();
            String result = cmbService.getItemAt(cmbService.getSelectedIndex()).translate(txtText.getText(), from, to);
            lblTranslatedText.setText("<html>" + result + "</html>");
        });
        jContentPane.add(btnTranslate);
        updateLanguages();
        return jContentPane;
    }

    private void updateLanguages() {
        cmbFrom.removeAllItems();
        cmbTo.removeAllItems();
// Path: OnlineTranslator/src/main/java/translator/data/Language.java
// public class Language {
//     private final String description;
//     private final String language;
// 
//     Language(String _desc, String _lang) {
//         this.description = _desc;
//         this.language = _lang;
//     }
// 
//     public String getLanguage() {
//         return language;
//     }
// 
//     public String toString() {
//         return description;
//     }
// }
// 
// Path: OnlineTranslator/src/main/java/translator/data/Translator.java
// public interface Translator {
// 
//     String translate(String text, String from, String to);
// 
//     Language[] getLanguages();
// }
// 
// Path: OnlineTranslator/src/main/java/translator/data/TranslatorFactory.java
// public class TranslatorFactory {
//     public static Vector<Translator> getTranslators() {
//         Vector<Translator> translators = new Vector<>();
//         translators.add(new Tureng());
//         translators.add(new Seslisozluk());
//         return translators;
//     }
// }


// Path: OnlineTranslator/src/main/java/translator/Main.java
import translator.data.Language;
import translator.data.Translator;
import translator.data.TranslatorFactory;
import javax.swing.*;
import java.awt.*;

        jContentPane.add(cmbService);

        JTextArea txtText = new JTextArea();
        JScrollPane pane = new JScrollPane(txtText);
        pane.setBounds(5, 30, 780, 75);
        jContentPane.add(pane);

        JLabel lblTranslatedText = new JLabel();
        JScrollPane pane1 = new JScrollPane(lblTranslatedText);
        pane1.setBounds(new Rectangle(5, 110, 780, 450));
        jContentPane.add(pane1);

        JButton btnTranslate = new JButton();
        btnTranslate.setBounds(620, 5, 165, 20);
        btnTranslate.setText("Translate");
        btnTranslate.setMnemonic('T');
        btnTranslate.addActionListener(e -> {
            String from = cmbFrom.getItemAt(cmbFrom.getSelectedIndex()).getLanguage();
            String to = cmbTo.getItemAt(cmbTo.getSelectedIndex()).getLanguage();
            String result = cmbService.getItemAt(cmbService.getSelectedIndex()).translate(txtText.getText(), from, to);
            lblTranslatedText.setText("<html>" + result + "</html>");
        });
        jContentPane.add(btnTranslate);
        updateLanguages();
        return jContentPane;
    }

    private void updateLanguages() {
        cmbFrom.removeAllItems();
        cmbTo.removeAllItems();
        for (Language language : cmbService.getItemAt(cmbService.getSelectedIndex()).getLanguages()) {