From c9dd9469183d95c6c2f4d01e3d6365ec57386a65 Mon Sep 17 00:00:00 2001 From: Leonard Kugis Date: Mon, 25 Apr 2022 18:43:46 +0200 Subject: Initial commit --- src/Mainframe.java | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100755 src/Mainframe.java (limited to 'src/Mainframe.java') diff --git a/src/Mainframe.java b/src/Mainframe.java new file mode 100755 index 0000000..e486e2a --- /dev/null +++ b/src/Mainframe.java @@ -0,0 +1,78 @@ +import java.awt.TextArea; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.JButton; +import javax.swing.JComboBox; +import javax.swing.JFrame; +import javax.swing.JScrollPane; +import javax.swing.JTextArea; + +import algorithmus.Algorithmus; +import algorithmus.Autokey; +import algorithmus.Blabla; +import algorithmus.Caesar; +import algorithmus.Case; +import algorithmus.Palisaden; +import algorithmus.Vigenere; +import algorithmus.XOR; +import algorithmus.Zaehlen; + + +public class Mainframe extends JFrame { + + private JTextArea input, output; + private JScrollPane scrollInput, scrollOutput; + private JComboBox combo; + private JButton options, encode, decode; + private Algorithmus[] algo = new Algorithmus[] { new Case(), new Caesar(), new Blabla(), new Zaehlen(), new Vigenere(), new XOR(), new Autokey(), new Palisaden() }; + + public Mainframe() { + this.setLayout(null); + this.setResizable(false); + this.setTitle("Kryptographie"); + this.setSize(500, 500); + input = new JTextArea(); + input.setLineWrap(true); + scrollInput = new JScrollPane(input); + scrollInput.setBounds(5, 5, 470, 205); + output = new JTextArea(); + output.setEditable(false); + output.setLineWrap(true); + scrollOutput = new JScrollPane(output); + scrollOutput.setBounds(5, 245, 470, 205); + String[] names = new String[algo.length]; + for(int i = 0; i