Java 源程序:
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.File;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
public class AESFrame extends JFrame implements ActionListener
{
private JLabel sourceLabel, aimLabel, keyLabel;
private JTextField sourceText, aimText, keyText;
private JButton encryptBt, decryptBt, clearBt, exitBt,
selectSourceBt, selectAimBt;
private JRadioButton[] methodRadioButtons=new JRadioButton[2];
private ButtonGroup methodGroup=new ButtonGroup();
public static void main(String[] args)
{
new AESFrame("AES 加密解密工具 By:***");
}
public AESFrame(String title)
{
super(title);
//初始化组件
keyLabel = new JLabel("密钥", SwingConstants.RIGHT);