求救,哪位好心人有MLDN魔乐李兴华JAVA WEB开发实战经典高级篇和框架篇的手册
求救,哪位好心人有MLDN魔乐李兴华JAVA WEB开发实战经典高级篇的手册,本人是个学生,没什么钱买,可是想要JAVA WEB开发实战经典高级篇的手册和框架篇的手册,哪位好心人有,买也可以,二手也没问题,跪求。。。。
最满意答案
import java.awt.BorderLayout; import java.awt.FlowLayout; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.io.BufferedInputStream; import java.io.BufferedOutputStream;
import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.RandomAccessFile;
import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JFileChooser; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField;
public class CodeChanger { int flag = 1; private JFrame frame; private JPanel upPanel; private JPanel midPanel; private JPanel downPanl; private JLabel label; private JPanel midUpPanel; private JPanel midMidPanel; private JPanel midDownPanel; private JCheckBox checkBox; private JPanel sourcePanel; private JPanel desPanel;
private JLabel sourceLabel; private JLabel desLabel; private JTextField sourceField; private JTextField desField; private JButton sourceButton; private JButton desButton;
private JLabel downLabel; private JTextField downField;
private JButton enter; private JButton cancel;
public CodeChanger() { frame = new JFrame(); upPanel = new JPanel(); midPanel = new JPanel(); downPanl = new JPanel(); midUpPanel = new JPanel(); midMidPanel = new JPanel(); midDownPanel = new JPanel(); label = new JLabel("鐚ご鐗屾枃浠跺姞/瑙e瘑鍣?, JLabel.CENTER); checkBox = new JCheckBox("瑕嗙洊鍘熸枃浠?, false); sourcePanel = new JPanel(); desPanel = new JPanel(); sourceLabel = new JLabel("鍘熸枃浠? "); desLabel = new JLabel("鐩爣鏂囦欢"); sourceField = new JTextField(10); desField = new JTextField(10); sourceButton = new JButton("棰勮"); desButton = new JButton("棰勮"); downLabel = new JLabel("鍔犲瘑绠楀瓙"); downField = new JTextField("杈撳叆鍔?瑙e瘑鍥犲瓙(0~255)", 12); enter = new JButton("鍔犲瘑/瑙e瘑"); cancel = new JButton("鍙栨秷");init(); addEventHandler(); showMe(); }
private void init() { frame.setLayout(new BorderLayout()); frame.add(upPanel, BorderLayout.NORTH); frame.add(midPanel, BorderLayout.CENTER); frame.add(downPanl, BorderLayout.SOUTH);
upPanel.add(label); midPanel.setLayout(new BorderLayout()); midPanel.add(midUpPanel, BorderLayout.NORTH); midPanel.add(midMidPanel, BorderLayout.CENTER); midPanel.add(midDownPanel, BorderLayout.SOUTH); midUpPanel.add(checkBox, JPanel.CENTER_ALIGNMENT);
midMidPanel.setLayout(new GridLayout(2, 1, 0, 0)); midMidPanel.add(sourcePanel); midMidPanel.add(desPanel); sourcePanel.setLayout(new FlowLayout(FlowLayout.LEFT)); desPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); sourcePanel.add(sourceLabel); sourcePanel.add(sourceField); sourcePanel.add(sourceButton); desPanel.add(desLabel); desPanel.add(desField); desPanel.add(desButton); midDownPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); midDownPanel.add(downLabel); midDownPanel.add(downField);
downPanl.setLayout(new FlowLayout(FlowLayout.CENTER, 20, 0)); downPanl.add(enter); downPanl.add(cancel);
}
public void addEventHandler() { checkBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { flag *= -1; if (flag == 1) { desField.setEditable(true); desButton.setEnabled(true); } else { desField.setEditable(false); desButton.setEnabled(false); } }
}); sourceButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JFileChooser jfc = new JFileChooser(); jfc.showOpenDialog(frame);
sourceField.setText(jfc.getSelectedFile().toString());
} });
desButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { JFileChooser jfc = new JFileChooser(); jfc.showOpenDialog(frame); desField.setText(jfc.getSelectedFile().toString());
}
}); cancel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { System.exit(0);
}
}); downField.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent e) { downField.setText(""); }}); enter.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { if (flag != 1) { String sourceFile = sourceField.getText(); int code; code = Integer.parseInt(downField.getText()); RandomAccessFile raf = null;
try { raf = new RandomAccessFile(sourceFile, "rw"); int c; while ((c = raf.read()) != -1) { raf.seek(raf.getFilePointer() - 1); raf.write(c ^ code); } } catch (IOException e1) { e1.printStackTrace(); } finally { if (raf != null) { try { raf.close(); } catch (IOException e1) { e1.printStackTrace(); } } }} else { String sourceFile = sourceField.getText(); String desFile = desField.getText(); int code = 0; code = Integer.parseInt(downField.getText()); InputStream fis = null; OutputStream fos = null; BufferedInputStream bis = null; BufferedOutputStream bos = null; try { fis = new FileInputStream(sourceFile); bis = new BufferedInputStream(fis); fos = new FileOutputStream(desFile); bos = new BufferedOutputStream(fos); while (bis.available() > 0) { bos.write(bis.read() ^ code);
} } catch (IOException e2) { e2.printStackTrace(); }
}
}
});
}
public void showMe() { frame.setVisible(true); frame.pack(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public static void main(String[] args) { new CodeChanger(); }
}
其他回答
哥不懂滴
相关问答
更多-
编一个java算法程序[2021-10-25]
class Arithmatic { private double o1, o2; public Arithmatic(double o1, double o2) { this.o1 = o1; this.o2 = o2; } public double add() { return o1 + o2; } public double sub() { return o1 - o2; } public double mul() { return o1 * o2; } public double div() { ... -
帮我用JAVA编一个加密程序[2024-01-08]
import java.io.*; public class EnCode { public String setInputCode(){ String strInputCode = new String(); InputStreamReader isr; BufferedReader br; try { System.out.print("Pleae input a statement: "); isr = new InputStreamReader(System.in); br = new Buffer ... -
JAVA程序加密,怎么做才安全????急[2023-01-27]
众所周知,java为开发语言提供了很方便的开发平台,但开发出来的程序很容易在不同的平台上面被移植,现在越来越多的人使用它开发软件。 Java有它方便的一个方面,但它同时也带给了开发者一个烦恼,这就是保护的办法不多,而且大多数不是很好用,这样自己辛苦开发出来的程序很容易被人复制而据为己有,一般情况下,大多数的人都是用混编器(java obfuscator)来把开发出来的程序进行打乱以达到没有办法来反编译观看源代码,但是这种办法在网上很容易找到相关的软件来重新整理,那么这个混编只能控制一些本来也没有办法动您的软 ... -
用java编一个程序(加密解密的)[2022-03-10]
//楼上的是VB代码?太夸张了!呵呵! import java.util.*; public class Test { public static void main(String args[]) { String str; char[] ch; Scanner reader = new Scanner(System.in); str = reader.nextLine(); ch = str.toCharArray(); for(int i = 0; iJAVA加密程序?急!!!谁帮编一个?[2023-06-28]
import java.awt.BorderLayout; import java.awt.FlowLayout; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.io.BufferedInpu ...Java编测试程序[2024-04-29]
你这个程序还是错的啊,汗, Integer I=new Integer(i);这个I是对象, 用JAVA的封装类.用java编一个“石头剪子布”的游戏,急求 急急急[2023-11-29]
这个没有gui的刚做的不知道是不是你想要的!!! 刚刚修改的加上了胜负计算 import java.util.Random; import java.util.Scanner; public class Game { private static int win=0; private static int fail=0; private static int pi=0; private static void check(int cpu,int pe){ int t=0; if(pe-cpu==2) t= ...想学java,可以用来编手机的一些小程序的[2022-06-27]
j2me是嵌入式系统开发了,应用在手机上的Application...呃,那得在java技术上研究蛮透彻了... 呵呵,turbo C?... LZ先弄懂java的基础,《java面向对象编程》。。。 面向对象编程思想,然后向j2me发展吧,好运!求用Java编一个小程序[2023-12-09]
class Retangle{ static public double countArea(double d1,double d2){ return d1*d2; } static public double countgirth(double d1,double d2){ return 2*(d1+d2); } 使用static方法,不需要创建实例谁帮编个java小程序。。很简单的。。100分奉上[2022-01-28]
wangyi6912写的不对,楼主要求的是1-100中的,你的是0-99中的,应该如下写: import java.util.HashSet; import java.util.Set; public class MyTime { public static void main(String[] args) { Set set=new HashSet();//相同的值会覆盖 while(set.size()<25){ int temp=(int)(Math.random()*100)+1; set.add( ...相关文章
更多- 《魔乐MLDN 3G版Java核心课程【李兴华主讲】-更新完》(3G java视频)[压缩包]
- 《魔乐MLDN 李兴华教你Android开发实战【本教程书籍和游戏篇已经上市】[完结]》2.3[安装包]
- 《 魔乐教你学JAVA (9月16日更新) 》(MLDN-JAVA)2013[压缩包]
- 《Java Web开发学习手册》扫描版[PDF]
- Hadoop入门实战手册 PDF
- 《2011版李兴华主讲-ORACLE实战 最强大的数据库课程[增加网盘下载]》(ORACLE)V2011[压缩包]
- 《经典软件工程、LINUX/UNIX、Sybase参考手册及系统指南》
- [IT教程网]MLDN魔乐教你直击JAVA面试(系列)[已经完结]
- Hadoop集群配置及MapReduce开发手册 PDF
- 《MLDN出品 魔乐科技Node.JS + MongoDB(JSP、HTML 、XML、JavaScript、Servlet、Struts、Ajax)视频汇总》(Node.JS + MongoDB\JSP、HTML 、XML、JavaScript、Servlet、Struts、Ajax nodejs)V2013[压缩包]
最新问答
更多- 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
- 如何通过引用返回对象?(How is returning an object by reference possible?)
- 矩阵如何存储在内存中?(How are matrices stored in memory?)
- 每个请求的Java新会话?(Java New Session For Each Request?)
- css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
- 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
- xcode语法颜色编码解释?(xcode syntax color coding explained?)
- 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
- 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
- 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
- 西安哪有PLC可控制编程的培训
- 在Entity Framework中选择基类(Select base class in Entity Framework)
- 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
- 电脑二级VF有什么用
- Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
- 金华英语角.
- 手机软件如何制作
- 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
- 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
- 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
- Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
- 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
- python的访问器方法有哪些
- DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
- 在Ruby中对组合进行排序(Sorting a combination in Ruby)
- 网站开发的流程?
- 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
- 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
- 透明度错误IE11(Transparency bug IE11)
- linux的基本操作命令。。。