91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 991KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-05
  • 語言: Java
  • 標簽: 加密解密??

資源簡介

java課程設計文件加密解密 自定義加密程序

資源截圖

代碼片段和文件信息


import?java.awt.*;
import?java.awt.event.*;
import?java.io.*;
public?class?Myjava?
{
public?static?void?main(String[]?args)
{
new?Keymake().lauch();
}
}
class?Keymake?extends?frame?
{
?String?DirName;
??String?FileName;
??String?s1;
??String?s2;
TextField?tf1;
Panel?p1;
CardLayout?c1;
public?void?lauch()
{
c1=new?CardLayout?();
this.settitle(“文件加密與解密“);
this.setBounds(300?300?50080);
this.setBackground(Color.LIGHT_GRAY);
p1=new?Panel();
????Panel?p2=new?Panel();
????Panel?p3=new?Panel();
p1.setLayout(c1);?
Label?l1=new?Label(“請選擇要操作的文件:“);
?tf1=new?TextField(30);
Button?b1=new?Button(“打開“);
b1.addActionListener(?new?Mylistener1());
p2.add(l1);
p2.add(b1);
p2.setVisible(true);
p1.add(p2“1“);
this.setVisible(true);
this.addWindowListener(new?MyWindowMonitor());
Button?b2=new?Button(“加密“);
Button?b3=new?Button(“解密“);
Button?b4=new?Button(“上一頁“);
b3.addActionListener(new?Mylistener3());
b2.addActionListener(new?Mylistener2());
b4.addActionListener(new?Mylistener4());
p3.add(tf1);
p3.add(b2);
p3.add(b3);
p3.add(b4);
p3.setVisible(true);
p1.add(p3“2“);
p1.setVisible(true);
add(p1);
setVisible(true);
}
class?Mylistener4?implements?ActionListener
?{
?public?void?actionPerformed(ActionEvent?e)
?{
?c1.show(p1“1“);
?????}
}
?class?Mylistener1?implements?ActionListener
?{
?public?void?actionPerformed(ActionEvent?e)
?{
?FileDialog?fd1=new?FileDialog(Keymake.this“選擇要操作的文件“FileDialog.LOAD);
?fd1.setVisible(true);
?fd1.setLocation(300?300);
?DirName=fd1.getDirectory();
?FileName=fd1.getFile();
?if(DirName==null){c1.show(p1“1“);}
?else
?{
?tf1.setText(DirName+FileName);
?c1.show(p1“2“);
?}?
?????}
}
?class?Mylistener3?implements?ActionListener
?{
?Dialog?fd2;
?public?void?actionPerformed(ActionEvent?e)
?{
?fd2=new?Dialog(Keymake.this“解密中“);
?fd2.setVisible(true);
?fd2.setBounds(300?300?400?80);
?fd2.setLayout(new?FlowLayout());
?Label?l1=new?Label(“您確定要對選定的文件進行解密嗎?“);
?Button?b1=new?Button(“YES“);
?b1.addActionListener(new?listener1());
?Button?b2=new?Button(“NO“);
b2.addActionListener(new?listener2());
?fd2.add(l1);
?fd2.add(b1);
?fd2.add(b2);
?fd2.addWindowListener(new?MyWindowMonitor1());
??}
?class?listener1?implements?ActionListener
?{
????TextField?dtf1;
????Dialog?d1;
?public?void?actionPerformed(ActionEvent?e)?
?{
?? ?d1=new?Dialog(Keymake.this“輸入密碼“false);
?? d1.setBounds(300?300?220?120);
?? d1.setVisible(true);
?? ?Label?dl1=new?Label(“請輸入密碼:“);
?? ??dtf1=new?TextField(10);
?? ? dtf1.setEchoChar(‘*‘)?;
?? ? Button?db1=new?Button(“確定“);
?? ? Button?db2=new?Button(“取消“);
?? ? d1.setLayout(new?FlowLayout());
?? ? d1.add(dl1);
?? ? d1.add(dtf1);
?? ? d1.add(db1);
?? ? d1.add(db2);
?? ? db1.addActionListener(new?

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2011-06-14?19:00??軟件09-3班??孫永斌?0920010316\
?????文件???????11621??2011-06-13?23:34??軟件09-3班??孫永斌?0920010316\Myjava.java
?????文件?????1318318??2011-06-14?09:40??軟件09-3班??孫永斌?0920010316\軟件09-3班??孫永斌?0920010316.doc

評論

共有 條評論