资源简介
LSB位图隐写java实现
代码片段和文件信息
import java.awt.Container;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.*;
public class FileChoose extends Jframe{
String path=“example.bmp“;
String str;
//C:\\Users\\john\\Desktop\\original_5MV1_7216000155f2118f.jpg“;
Jframe jf=new Jframe(“二十四位位图隐写“);
Container container=jf.getContentPane();
JLabel showpic=new JLabel(“显示文件路径“JLabel.CENTER);
JLabel pswtip=new JLabel(“在此键入隐写消息“);
JLabel pathtip=new JLabel(“请选择要隐写或要解析的24位位图“);
JButton okbutton=new JButton(“隐写“);
JButton choose=new JButton(“选择文件“);
JButton undo=new JButton(“解析“);
JTextField text=new JTextField();
public static void main(String[] args) {
//new test().Createframe(“hello“);
//new myframe().createframe();
//String path;
FileChoose frame=new FileChoose();
//frame.setVisible(true);
//System.out.println(FileChoose.)
}
public FileChoose()
{
super();
container.add(showpic);
container.add(okbutton);
container.add(choose);
container.add(text);
container.add(undo);
container.add(pswtip);
container.add(pathtip);
container.setLayout(null);
jf.setVisible(true);
jf.setSize(600550);
jf.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
okbutton.setBounds(400 40010030);
undo.setBounds(400 450 100 30);
choose.setBounds(250 32010030);
pathtip.setBounds(200 60 200 30);
text.setBounds(200 400 170 30);
showpic.setIcon(new ImageIcon(“example.jpg“));
showpic.setHorizontalTextPosition(JLabel.CENTER);
showpic.setVerticalTextPosition(JLabel.BOTTOM);
pswtip.setBounds(80 400 12030);
jf.add(showpic);
showpic.setBounds(100 0 400400);
//setBounds(100100300200);
//settitle(“文件选择对话框“);
//setDefaultCloseOperation(Jframe.EXIT_ON_CLOSE);
JMenuBar menuBar=new JMenuBar();
JMenu filemenu=new JMenu(“文件“);
jf.setJMenuBar(menuBar);
menuBar.add(filemenu);
JMenuItem open = new JMenuItem(“打开“);
JMenuItem exit = new JMenuItem(“退出“);
filemenu.add(open);
filemenu.add(exit);
exit.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
System.exit(0);
}
});
/*
open.addActionListener(new ActionListener()
{
public void actionPerformed (ActionEvent e)
{
JFileChooser filechoose = new JFileChooser();
int returnval=filechoose.showOpenDialog(null);//getContentPane());
if(returnval==JFileChooser.APPROVE_OPTION)
{
File pic = filechoose.getSelectedFile();
path=pic.getAbsolutePath();
Image myimage =null;
try{
myimage=ImageIO.read(new File(path));
}catch(IOException ex){}
showpic.setIcon(new ImageIcon(myimage));
//showpic.setBounds(3 属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 155574 2013-04-11 14:01 lsb\1.bmp
文件 5402 2013-04-25 22:25 lsb\FileChoose.java
文件 1302 2013-04-17 17:17 lsb\example.jpg
文件 1412 2013-04-25 22:26 lsb\jiami.java
文件 596 2013-04-16 22:52 lsb\jiemi.java
目录 0 2013-04-17 23:08 lsb\
相关资源
- java 毕业设计 进销存管理系统 源码
- java图片浏览器跨平台运行程序与源码
- 基于java的在线考试系统-毕业设计
- 微博系统(Java源码,servlet+jsp),适
- java串口通信全套完整代码-导入eclip
- jsonarray所必需的6个jar包.rar
- 三角网构TIN生成算法,Java语言实现
- java代码编写将excel数据导入到mysql数据
- Java写的cmm词法分析器源代码及javacc学
- JAVA JSP公司财务管理系统 源代码 论文
- JSP+MYSQL旅行社管理信息系统
- 推荐算法的JAVA实现
- 基于Java的酒店管理系统源码(毕业设
- java-图片识别 图片比较
- android毕业设计
- java23种设计模式+23个实例demo
- java Socket发送/接受报文
- JAVA828436
- java界面美化 提供多套皮肤直接使用
- 在线聊天系统(java代码)
- 基于Java的图书管理系统807185
- java中实现将页面数据导入Excel中
- java 企业销售管理系统
- java做的聊天系统(包括正规课程设计
- Java编写的qq聊天室
- 商店商品管理系统 JAVA写的 有界面
- JAVA开发聊天室程序
- 在linux系统下用java执行系统命令实例
- java期末考试试题两套(答案) 选择(
- JAVA3D编程示例(建模、交互)
川公网安备 51152502000135号
评论
共有 条评论