GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — CipherGUI/CipherGUI.java at main · AlexaJavaDev/CipherGUI Expand file tree/ Copy pathCipherGUI.javaMore file actions 45 lines (38 loc) · 1.6 KB / Copy pathCipherGUI.javaFile metadata and controls45 lines (38 loc) · 1.6 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 import javax.swing.*; import java.awt.*; public class CipherGUI { public static void main(String[] args) { JFrame frame = new JFrame("Шифратор v1.0.1"); frame.setLayout(new BoxLayout(frame.getContentPane(), BoxLayout.Y_AXIS)); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JTextField inputField = new JTextField(); inputField.setMaximumSize(new Dimension(300, 30)); JButton encryptButton = new JButton("Зашифровать"); JButton decryptButton = new JButton("Расшифровать"); JLabel resultLabel = new JLabel(); frame.add(Box.createVerticalStrut(10)); frame.add(inputField); frame.add(Box.createVerticalStrut(10)); JPanel buttonPanel = new JPanel(new FlowLayout()); buttonPanel.add(encryptButton); buttonPanel.add(decryptButton); frame.add(buttonPanel); frame.add(Box.createVerticalStrut(5)); JPanel resultPanel = new JPanel(new FlowLayout(FlowLayout.CENTER)); resultPanel.add(resultLabel); frame.add(resultPanel); frame.add(Box.createVerticalGlue()); encryptButton.addActionListener(e -> { String text = inputField.getText(); String encrypted = Cipher.encrypt(text); resultLabel.setText(encrypted); }); decryptButton.addActionListener(e -> { String text = inputField.getText(); String decrypted = Cipher.decrypt(text); resultLabel.setText(decrypted); }); frame.setSize(350, 220); frame.setVisible(true); } } |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |