S天狼I
S天狼I
关注数: 44
粉丝数: 17
发帖数: 2,875
关注贴吧数: 16
墓碑。【悲哀】今天发生了几件悲哀的事情 1. 英语单词册掉了 2. 下个星期晚自习上到九点半 3. 下个星期星期六要上课 4. 要培训计算机了
墓碑。【数据库】分享目前学的数据库语句 =============================================================== 分隔符 ===============================================================
墓碑。【狂水】像上次磁力吧那样水 啦啦啦啦啦啦啦啦
墓碑。【祝贺】搞了这么久终于弄起了JDBC 啦啦啦啦啦啦
墓碑。【祝贺】百度终于让上百度了 啦啦啦啦啦啦
墓碑。【我来水一贴】 十五字十五字十五字
乡间晚风。星际外交
乡间晚风。分享高中的好东西 针对即将伸入羔中的童鞋们,我在这里分享三个URL 有高一到高三的数理化教程【以后就不去补习班了
磁力。【马里奥游戏基本框架】src_5 File Enemy.java package mario; import java.awt.image.BufferedImage; public class Enemy implements Runnable { // 坐标private int x;private int y; // 初始坐标private int startX;private int startY; // 类型private int type; // 显示的图片private BufferedImage showImage = null; // 移动方向private boolean isLeftOrUp = false; // 场景对象private BackGround bg = null; // 移动的极限范围private int upMax = 0;private int downMax = 0; // 移动图片状态private int movingImage = 0; // 定义移动线程private Thread t = new Thread(this); // 创建蘑菇public Enemy(int x, int y, boolean isLeft, int type, BackGround bg) {this.x = x;this.startX = x;this.y = y;this.startY = y;this.isLeftOrUp = isLeft;this.type = type;this.bg = bg; // 取得蘑菇图片 if (this.type == 1) {this.showImage = StaticImage.TriangleImage.get(0);} t.start(); // 线程不会立即启动t.suspend();} // 创建食人花 public Enemy(int x, int y, int upMax, int downMax, boolean isUp, int type,BackGround bg) {this.x = x;this.startX = x;this.y = y;this.startY = y;this.upMax = upMax;this.downMax = downMax;this.isLeftOrUp = isUp;this.type = type;this.bg = bg; if (2 == this.type) {this.showImage = StaticImage.flowerImage.get(0);} t.start(); // 线程不会立即启动t.suspend();} public void reset() { // 将坐标初始回去this.x = this.startX;this.y = this.startY; // 如果是蘑菇怪 if(1 == this.type) {this.showImage = StaticImage.TriangleImage.get(0);}else {this.showImage = StaticImage.flowerImage.get(0);}} public void dead() { // 移除敌人this.bg.getAllEnemy().remove(this); // 将敌人添加到被移除表中this.bg.getRemovedEnemy().add(this);} public BufferedImage getShowImage() {return showImage;} public int getType() {return type;} public void setShowImage(BufferedImage showImage) {this.showImage = showImage;} public Thread getT() {return t;} public int getX() {return x;} public int getY() {return y;} public void run() {while (true) { // 蘑菇if (1 == this.type) { boolean canRight = true;boolean canLeft = true; // 判断当前是否可以移动,是否与障碍物接触 for (int i = 0; i < this.bg.getAllObstruction().size(); i++) {Obstruction ob = this.bg.getAllObstruction().get(i); // 当前处在障碍物高度范围之内 if (ob.getX() == this.x + 60&& (this.y < ob.getY() + 60 && this.y > ob.getY() - 60)) {canRight = false;} else if (ob.getX() == this.x - 60&& (this.y < ob.getY() + 60 && this.y > ob.getY() - 60)) {canLeft = false;} // 判断是否超出了边界if (this.x < 0) {canLeft = false;} else if (this.x > 540) {canRight = false;}} // 如果正在向左,却不能向左了if (!canLeft && this.isLeftOrUp) {this.isLeftOrUp = false;} // 如果正在向右,却不能向右了if (!canRight && !this.isLeftOrUp) {this.isLeftOrUp = true;} // 如果往左 if (this.isLeftOrUp) {this.x -= 2;} else {this.x += 2;} // 交替更换图片 if (this.movingImage == 0) {this.movingImage = 1; this.showImage = StaticImage.TriangleImage.get(1); } else {this.showImage = StaticImage.TriangleImage.get(0);this.movingImage = 0;}}// 食人花else if (2 == this.type) { // 先判断是否移动到最大值 if (this.isLeftOrUp && this.y == this.upMax) {this.isLeftOrUp = false;} else if (this.isLeftOrUp == false && this.y == this.downMax) {this.isLeftOrUp = true;} // 如果往上 if (this.isLeftOrUp) {this.y -= 2;} else {this.y += 2;} if (this.movingImage == 1) {this.movingImage = 0;this.showImage = StaticImage.flowerImage.get(1);} else {this.showImage = StaticImage.flowerImage.get(0);this.movingImage = 1;}} try {Thread.sleep(20);} catch (InterruptedException e) {e.printStackTrace();}} }}
磁力。【马里奥游戏基本框架】src_4 File Obstruction.java package mario; import java.awt.image.BufferedImage; public class Obstruction implements Runnable{ // 保存的坐标private int x; private int y; // 保存的类型private int type; // 初始的类型private int startType; // 欲显示图片private BufferedImage showImage = null; // 降旗的线程private Thread t = new Thread(this); // 当前场景private BackGround bg = null; public Obstruction(int x, int y, int type) { this.x = x; this.y = y; this.type = type; this.startType = type;this.setImage(); // 设置图片} public Obstruction(int x, int y, int type, BackGround bg) { this.x = x; this.y = y; this.type = type; this.startType = type; this.setImage(); // 设置图片 if(11 == type) { this.bg = bg;this.t.start();}} // 重置所有的图片public void reset() { // 先修改类型为原始的类型this.type = startType; // 再重置图片 this.setImage();} // 根据当前图片状态改变显示图片 public void setImage() { // 每个障碍物type都不一样,type所对应的是ArrayList中第n个障碍物,ArrayList下标是从0开始 showImage = StaticImage.ObstructionImage.get(type);} public int getX() {return x;} public int getY() {return y;} public void setType(int type) {this.type = type;} public int getType() {return type;} public BufferedImage getShowImage() {return showImage;} // 完成游戏结束时,降旗的操作 public void run() { while(true) { if(this.bg.isOver()) { if(this.y < 420) {this.y += 5;} else { // 降旗结束this.bg.setDownOver(true);}} try {Thread.sleep(50);} catch (InterruptedException e) {e.printStackTrace();}}}}
磁力。【马里奥游戏基本框架】src_3 package mario; import java.awt.image.BufferedImage;import java.util.ArrayList;import java.util.List; public class BackGround {// 当前场景的图片private BufferedImage bgImage = null; // 当前场景顺序private int sort; // 当前是否为最后一个场景private boolean flag; // 所有敌人private List<Enemy> allEnemy = new ArrayList<Enemy>(); // 所有的障碍物private List<Obstruction> allObstruction = new ArrayList<Obstruction>(); // 被消灭的敌人private List<Enemy> removedEnemy = new ArrayList<Enemy>(); // 被消灭的敌人private List<Obstruction> removedObstruction = new ArrayList<Obstruction>();// 游戏结束的标记private boolean isOver = false; // 降旗是否结束private boolean isDownOver = false;public BackGround(int sort, boolean flag) {this.sort = sort;this.flag = flag; // 是最后一个场景if (flag) {// 读取末尾场景bgImage = StaticImage.lastImage;}// 不是最后一个else {// 读取非末尾场景bgImage = StaticImage.firstImage;} if (1 == sort) {// 建立整个地面for (int i = 0; i < 15; i++) {// 窗体宽900,图片宽60,所以需要15块// 用的是第11个图片,但因为ArrayList下标是从0开始,所以type就是10this.allObstruction.add(new Obstruction(i * 60, 540, 10));}// 绘制问号方块this.allObstruction.add(new Obstruction(120, 360, 4));this.allObstruction.add(new Obstruction(360, 360, 4));this.allObstruction.add(new Obstruction(480, 360, 4));this.allObstruction.add(new Obstruction(420, 180, 4)); // 绘制墙壁this.allObstruction.add(new Obstruction(300, 360, 5));this.allObstruction.add(new Obstruction(420, 360, 5));this.allObstruction.add(new Obstruction(540, 360, 5)); // 绘制水管this.allObstruction.add(new Obstruction(660, 480, 0));this.allObstruction.add(new Obstruction(720, 480, 1));this.allObstruction.add(new Obstruction(660, 540, 2));this.allObstruction.add(new Obstruction(720, 540, 3));// 绘制陷阱(隐形的砖块)this.allObstruction.add(new Obstruction(480, 180, 8)); // 定义蘑菇敌人this.allEnemy.add(new Enemy(600, 480, true, 1, this));// 定义食人花this.allEnemy.add(new Enemy(690, 540, 420, 540, true, 2, this));}// 绘制第二个场景else if (2 == sort) {// 建立整个地面for (int i = 0; i < 15; i++) {// 如果是10,就不绘制,作为陷阱使用if (i != 10) {// 窗体宽900,图片宽60,所以需要15块// 用的是第11个图片,但因为ArrayList下标是从0开始,所以type就是10this.allObstruction.add(new Obstruction(i * 60, 540, 10)); }}// 绘制水管 this.allObstruction.add(new Obstruction(120, 420, 0)); this.allObstruction.add(new Obstruction(180, 420, 1)); this.allObstruction.add(new Obstruction(120, 480, 2)); this.allObstruction.add(new Obstruction(180, 480, 3)); this.allObstruction.add(new Obstruction(120, 540, 2)); this.allObstruction.add(new Obstruction(180, 540, 3));// 绘制水管 this.allObstruction.add(new Obstruction(300, 360, 0)); this.allObstruction.add(new Obstruction(360, 360, 1)); this.allObstruction.add(new Obstruction(300, 420, 2)); this.allObstruction.add(new Obstruction(360, 420, 3)); this.allObstruction.add(new Obstruction(300, 480, 2)); this.allObstruction.add(new Obstruction(360, 480, 3)); this.allObstruction.add(new Obstruction(300, 540, 2)); this.allObstruction.add(new Obstruction(360, 540, 3));// 绘制水管 this.allObstruction.add(new Obstruction(660, 360, 0)); this.allObstruction.add(new Obstruction(720, 360, 1)); this.allObstruction.add(new Obstruction(660, 420, 2)); this.allObstruction.add(new Obstruction(720, 420, 3)); this.allObstruction.add(new Obstruction(660, 480, 2)); this.allObstruction.add(new Obstruction(720, 480, 3)); this.allObstruction.add(new Obstruction(660, 540, 2)); this.allObstruction.add(new Obstruction(720, 540, 3)); // 绘制问号this.allObstruction.add(new Obstruction(540, 300, 4)); this.allObstruction.add(new Obstruction(420, 180, 4)); // 绘制敌人this.allEnemy.add(new Enemy(660, 480, true, 1, this)); this.allEnemy.add(new Enemy(330, 540, 300, 540, true, 2, this)); this.allEnemy.add(new Enemy(690, 300, 300, 540, false, 2, this)); this.allEnemy.add(new Enemy(150, 420, 360, 540, false, 2, this)); } else if (3 == sort) { for (int i = 0; i < 15; i++) { // 窗体宽900,图片宽60,所以需要15块// 用的是第11个图片,但因为ArrayList下标是从0开始,所以type就是10 this.allObstruction.add(new Obstruction(i * 60, 540, 10));} this.allObstruction.add(new Obstruction(550, 200, 11, this)); this.allObstruction.add(new Obstruction(520, 480, 7));}} public List<Obstruction> getAllObstruction() {return allObstruction;} public BufferedImage getBgImage() {return bgImage;} public List<Enemy> getAllEnemy() {return allEnemy;} public boolean isFlag() {return flag;} public List<Enemy> getRemovedEnemy() {return removedEnemy;} public List<Obstruction> getRemovedObstruction() {return removedObstruction;} public int getSort() {return sort;} public boolean isOver() {return isOver;} public void setOver(boolean isOver) {this.isOver = isOver;} public boolean isDownOver() {return isDownOver;} public void setDownOver(boolean isDownOver) {this.isDownOver = isDownOver;} public void setBgImage(BufferedImage bgImage) {this.bgImage = bgImage;} // 重置所有的障碍物与敌人,返回到原有坐标,并恢复状态public void reset() { this.allEnemy.addAll(this.removedEnemy); this.allObstruction.addAll(this.removedObstruction); for (int i = 0; i < this.allEnemy.size(); i++) {this.allEnemy.get(i).reset();}for (int i = 0; i < this.allObstruction.size(); i++) {this.allObstruction.get(i).reset();}} // 敌人开始移动 public void enemyStartMove() {for (int i = 0; i < this.allEnemy.size(); i++) { // 使线程启动this.allEnemy.get(i).getT().resume();}} }
磁力。【马里奥游戏基本框架】src_2 File StaticImage.java package mario; import java.awt.image.BufferedImage;import java.io.File;import java.io.IOException;import java.util.ArrayList;import java.util.List; import javax.imageio.ImageIO; public class StaticImage { // 马里奥角色图片public static List<BufferedImage> allMarioImage = new ArrayList<BufferedImage>(); // 第一张场景游戏图片public static BufferedImage firstImage = null; // 最后一张场景游戏图片public static BufferedImage lastImage = null; // 开始游戏图片public static BufferedImage beginImage = null; // 食人花的图片public static List<BufferedImage> flowerImage = new ArrayList<BufferedImage>(); // 蘑菇头图片public static List<BufferedImage> TriangleImage = new ArrayList<BufferedImage>(); // 乌龟图片public static List<BufferedImage> TurtleImage = new ArrayList<BufferedImage>(); // 障碍物图片public static List<BufferedImage> ObstructionImage = new ArrayList<BufferedImage>(); // 马里奥死亡图public static BufferedImage marioDeadImage = null; // 路径private static String imagePath = System.getProperty("user.dir")+ "\\bin\\"; // 初始化所有的图片 public static void init() throws IOException { // 读取马里奥的图片for (int i = 1; i <= 10; i++) {allMarioImage.add(ImageIO.read(new File(imagePath + i + ".jpg")));} // 获取场景图片beginImage = ImageIO.read(new File(imagePath + "start.jpg")); lastImage = ImageIO.read(new File(imagePath + "firststageend.jpg"));firstImage = ImageIO.read(new File(imagePath + "firststage.jpg")); // 获取怪物图片 for (int i = 1; i <= 5; i++) { if (i <= 2) { flowerImage.add(ImageIO.read(new File(imagePath + "flower" + i+ ".jpg")));} if (i <= 3) {TriangleImage.add(ImageIO.read(new File(imagePath + "triangle"+ i + ".jpg")));} TurtleImage.add(ImageIO.read(new File(imagePath + "Turtle" + i+ ".jpg")));} // 获取障碍物图片 for (int i = 1; i <= 12; i++) {ObstructionImage.add(ImageIO.read(new File(imagePath + "ob" + i+ ".jpg")));} // 马里奥死亡的图片 marioDeadImage = ImageIO.read(new File(imagePath + "over.jpg")); } }
磁力。【马里奥游戏基本框架】src_1 File Ui.java package mario; import java.awt.Graphics; import java.awt.Toolkit; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.image.BufferedImage; import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import javax.swing.JFrame;import javax.swing.JOptionPane; public class Ui extends JFrame implements KeyListener, Runnable { // 全部的场景private List<BackGround> allBG = new ArrayList<BackGround>();// 马里奥对象private Mario mario = null;// 当前要显示的场景private BackGround nowBG = null;// 刷新显示内容private Thread th = new Thread(this);// 是否已经开始游戏private boolean isBegin = false; public static void main(String[] args) {new Ui();} public Ui() {setTitle("马里奥游戏");setSize(900, 600); int x = Toolkit.getDefaultToolkit().getScreenSize().width;int y = Toolkit.getDefaultToolkit().getScreenSize().height;setLocation(x / 4, y / 4); // 设置窗口位置setResizable(false); // 窗体不能被最大化 // 初始化图片try {// 将所有图片读入StaticImage保存StaticImage.init();} catch (IOException e) {e.printStackTrace();} // 创建全部场景,一共三个场景for (int i = 1; i <= 3; i++) { // 如果3 == i, 那么就是最后一个场景if (3 == i) {this.allBG.add(new BackGround(i, true));} else {// 否则不是this.allBG.add(new BackGround(i, false));} } // 将第一个场景设置为当前场景this.nowBG = allBG.get(0);// 初始化马里奥对象this.mario = new Mario(0, 480);// 将当前场景放在马里奥场景成员中this.mario.setBg(this.nowBG); th.start(); // 重绘窗体,会调用paint方法this.repaint();this.addKeyListener(this); // 添加按键消息 this.setDefaultCloseOperation(EXIT_ON_CLOSE);this.setVisible(true);} // 为了防止屏幕闪烁,加入双缓冲技术@Overridepublic void paint(Graphics g) {// 建立临时缓冲图片BufferedImage image = new BufferedImage(900, 600,BufferedImage.TYPE_3BYTE_BGR);// 取得画笔对象Graphics g2 = image.getGraphics();// 将图片绘制到缓冲图片image中g2.drawImage(this.nowBG.getBgImage(), 0, 0, this); // 游戏开始if (this.isBegin) { // 先绘制敌人,再绘制障碍物,是因为为了把食人花覆盖掉// 绘制敌人图片Iterator<Enemy> it2 = this.nowBG.getAllEnemy().iterator();while (it2.hasNext()) { Enemy e = it2.next(); g2.drawImage(e.getShowImage(), e.getX(), e.getY(), this);} // 绘制障碍物Iterator<Obstruction> it = this.nowBG.getAllObstruction().iterator(); // 也可以不使用迭代,而是用for循环while (it.hasNext()) { // 取得障碍物对象Obstruction ob = it.next(); g2.drawImage(ob.getShowImage(), ob.getX(), ob.getY(), this);} // 绘制马里奥图片g2.drawImage(this.mario.getShowImage(), this.mario.getX(),this.mario.getY(), this); g2.drawString("生命:" + this.mario.getLives(), 750, 50); } else { g2.drawImage(StaticImage.beginImage, 0, 0, this);}// 把image缓冲图片绘制到当前窗体中 g.drawImage(image, 0, 0, this);} @Override// 键被按下 public void keyPressed(KeyEvent ke) {// L: 37 U:38 R:39 D:40 // 防止在游戏开始前按键,使人物出现后自动变化位置 if (isBegin) { // 向右移动if (ke.getKeyCode() == 39) { this.mario.rightMove();}// 向左移动 else if (37 == ke.getKeyCode()) {this.mario.leftMove();}// 跳跃 else if (38 == ke.getKeyCode()) { this.mario.jump();}}else {// 按空格if (32 == ke.getKeyCode()) { this.isBegin = true;// 开始之后才能使敌人移动this.nowBG.enemyStartMove();// 设置分数和生命this.mario.setLives(3);this.mario.setScore(0);}} } @Override// 键被抬起 public void keyReleased(KeyEvent ke) { // 向右移动停止if (ke.getKeyCode() == 39) {this.mario.rightStop();}// 向左移动停止else if (ke.getKeyCode() == 37) {this.mario.leftStop();}} @Overridepublic void keyTyped(KeyEvent e) { } public void run() {while (true) { // 马里奥死亡了if (this.mario.isDead()) { JOptionPane.showMessageDialog(this, "马里奥死亡");System.exit(-1);} this.repaint(); // 马里奥走到了最右端if (this.mario.getX() >= 840) { // 重置当前场景this.nowBG = this.allBG.get(this.nowBG.getSort()); // 将当前场景添加到马里奥里面去this.mario.setBg(this.nowBG); // 修改马里奥横轴坐标this.mario.setX(0);this.mario.setY(480); // 将场景中的敌人移动this.nowBG.enemyStartMove();} if(this.mario.isClear()) { // 游戏结束 JOptionPane.showMessageDialog(this, "游戏通关");} try {Thread.sleep(30);} catch (InterruptedException e) {e.printStackTrace();} }} }
磁力。【文件批量修改器】src_6 File DeleteThread.java package org; public class DeleteThread implements Runnable{ private String path; private String[] postfix; public void setPath(String path) {this.path = path;} public void setPostfix(String[] postfix) {this.postfix = postfix;} public void run() {FileDeal fd = new FileDeal(); for (int j = 0; j < postfix.length; j++) {fd.findFile(path, postfix[j]); }fd.deleteFile(); }}
磁力。【文件批量修改器】src_5 File FileDeal.java package org; import java.util.ArrayList;import java.util.List;import java.io.File; public class FileDeal { public static List<String> FilePath = new ArrayList<String>(); public static List<String> ShortPath = new ArrayList<String>(); public void findFile(String path, String postfix) { File f = new File(path); File[] pathArr = f.listFiles(); for (int i = 0; i < pathArr.length; i++) {if(pathArr[i].isFile()) { String name = pathArr[i].toString(); //将路径名转为字符串String pf = Parse.getPostfix(name); //获取文件后缀 if(pf.equals(postfix) == true) { //如果是要删除或重名为的后缀名 ShortPath.add(name); //重名为的时候用 if(Parse.isScript(name) == true){ //如果是副本FilePath.add(name);} } } }} public void deleteFile() {for (int i = 0; i < FilePath.size(); ) { File fp = new File(FilePath.get(i)); fp.delete(); FilePath.remove(i);} } public void reName(String path, String rePostfix) {for (int i = 0; i < ShortPath.size();) { String filepath = path + "\\" + Parse.getFileName(ShortPath.get(i))+ rePostfix; System.out.println(filepath); File fp = new File(ShortPath.get(i)); fp.renameTo(new File(filepath)); ShortPath.remove(i);}}}
磁力。【文件批量修改器】src_4 File Parse.java package org; import java.io.File; public class Parse { //添加一个反斜杠字符 public static String addBackslash(String path) {String[] pathName = path.split("\\\\"); String str = new String(); for (int i = 0; i < pathName.length; i++) {str += pathName[i]; if(i + 1 != pathName.length) str += "\\\\";} return str;} //解析文本框后缀 public static String[] analyzePostfix(String postfix) {return postfix.split("/");} //获取一个文件的后缀名 public static String getPostfix(String fileName) { int index = fileName.lastIndexOf('.'); String str = new String(); for (int i = index; i < fileName.length(); i++) { str += fileName.charAt(i); } return str;} //是否为脚本public static boolean isScript(String name) { int ch1 = name.lastIndexOf('本'); int ch2 = name.lastIndexOf('.'); int ch3 = name.lastIndexOf(')'); return ch1 + 1 == ch2 || ch3 + 1 == ch2;} // 获取文件名字public static String getFileName(String path) { int index = path.lastIndexOf("\\"); String str = new String(); while(path.charAt(++ index) != '.') {str += path.charAt(index); }return str; }}
磁力。【文件批量修改器】src_3 File ReNameThread.java package org; public class ReNameThread implements Runnable{ private String path; private String postfix; private String refix; ReNameThread(String path, String postfix, String refix) {this.path = path; this.postfix = postfix; this.refix = refix;} public void run() { FileDeal fd = new FileDeal(); fd.findFile(path, postfix); fd.reName(path, refix);}}
磁力。【文件批量修改器】src_2 File Test.java package org; public class Test { public static void main(String[] args) { new Ui().init(); }}
磁力。【文件批量修改器】src_1 File Ui.java package org; import java.awt.BorderLayout; import java.awt.FlowLayout; import java.awt.GridLayout; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.swing.ButtonGroup; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JRadioButton; import javax.swing.JTextField; public class Ui implements ActionListener { JTextField tfPath = new JTextField(40); // 文件路径文本框 JTextField tfType = new JTextField(40); // 文件类型文本框 JTextField tfReFix = new JTextField(40); // 文件重名为后缀文本框 private String path; private String[] postfix; private String refix; private int flag = 0; public void init() { JFrame jf = new JFrame("批量文件操作器"); jf.setLayout(new BorderLayout(10, 20)); jf.setSize(250, 270); jf.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(-1);} }); // 文件路径文本框 JPanel jp1 = new JPanel(new GridLayout()); JLabel lb1 = new JLabel("文件绝对路径:"); jp1.add(lb1); jp1.add(tfPath); // 文件类型文本框 JPanel jp2 = new JPanel(new GridLayout()); JLabel lb2 = new JLabel("文件类型:"); jp2.add(lb2);jp2.add(tfType); // 两个单选框JPanel jp4 = new JPanel(new FlowLayout()); JRadioButton jrb1 = new JRadioButton("删副本(多)"); JRadioButton jrb2 = new JRadioButton("重名为(单)"); jrb1.addActionListener(this); jrb2.addActionListener(this); jp4.add(jrb1); jp4.add(jrb2); ButtonGroup bg = new ButtonGroup(); bg.add(jrb1); bg.add(jrb2); // 重名为后缀文本框 JPanel jp5 = new JPanel(new GridLayout()); JLabel lb3 = new JLabel("重名为后缀"); jp5.add(lb3); jp5.add(tfReFix); // 确认按钮JButton bn = new JButton("开始");bn.addActionListener(new ActionListener() { @Overridepublic void actionPerformed(ActionEvent e) { if (1 == flag) { path = Parse.addBackslash(tfPath.getText()); // 获得路径postfix = Parse.analyzePostfix(tfType.getText()); // 获得后缀名 if(path != null && postfix!= null) { DeleteThread ft = new DeleteThread(); ft.setPath(path); ft.setPostfix(postfix); Thread t1 = new Thread(ft); t1.start(); } }else if(2 == flag) { path = Parse.addBackslash(tfPath.getText()); // 获得路径postfix = Parse.analyzePostfix(tfType.getText()); // 获得后缀名refix = tfReFix.getText(); //获得重命名后缀if(path != null && postfix != null && refix != null) {ReNameThread rnt = new ReNameThread(path, postfix[0], refix); Thread t2 = new Thread(rnt); t2.start();}} else {} } } ); JPanel jp3 = new JPanel();jp3.add(bn); JPanel jp = new JPanel(new GridLayout(5, 1, 0, 10)); jp.add(jp1); jp.add(jp2); jp.add(jp4); jp.add(jp5); jp.add(jp3); jf.add(jp, BorderLayout.NORTH); int x = Toolkit.getDefaultToolkit().getScreenSize().width; int y = Toolkit.getDefaultToolkit().getScreenSize().height;jf.setLocation(x - 600, y - 600); jf.setVisible(true); } public void actionPerformed(ActionEvent e) {if ("删副本(多)" == e.getActionCommand()) {flag = 1;} else if ("重名为(单)" == e.getActionCommand()) {flag = 2;}} }
乡间晚风。【我翻身了!】天狼人民共和国从此成立 但是这只是开始,目测八月份还有高中衔接班
波板糖。【我翻身了!】终于中考完了 目测八月份还有高中衔接班,这是非常悲剧的!!!!
墓碑。【报道哈】看来我是第五个 RT 猜猜我是谁 【泥垢了
磁力。【转载】魔塔的源码 主要是C++
波板糖。【超科普】我们是谁 我们是谁?我们来自哪里?为什么我们具有海陆生物的特征?我们如何进化? 为什么会有信仰?我们的文化来自何方?什么是“年”? 什么是巨人?梦是什么?什么是长生不老?是否真的有地底人? 人体为什么会自燃?人会瞬移吗?人的第六感是什么?我们会意念移物吗?我们会预言未来吗?魔法是什么?诅咒是什么?临死时人会见到什么? 有外星人吗?为什么只有华夏文明留了下来?所有的人都来自于华夏吗?女娲是谁?上帝是谁……………………………………………………………………………………………………… 这些都等着我们来探索。但是,目前超科学得出了一些答案,赋给了这些问题
【围观】这里是不是刚来了诺亚洪水 回收站提醒超多
波板糖。【灰行】本次航班从宅博士家跑到附近飞到一个秘密的机场 本次飞机从宅博士家飞往秘密机场。乘客人数为100人。所有导航数据调好,【乘客检查单省略】航向295°,飞行高度36000ft,修正海压1139,无风。准备滑行,襟翼10°,油门25%。从A出,上ZUCK 2R。【刚有一架B747和A310降落】上跑道了,起飞检查单完毕。无电子设备都已经干扰,联系塔台。油门60%。
磁力。【格式】试试gif最大传送大小
乡间晚风。等着那位星子回帖。 Wait
乡间晚风。诈称伽罗上讲者亡 @伽罗上将 我认识了一个叫星子的人,和你很多地方很像唉
乡间晚风。视频风
波板糖。【格式】此视频很不错
【巴黎向日葵的殇】无聊发个贴玩玩
磁力。【挣经验】快升级快升级 123456789012345678901234567890一共三十字节
波板糖。【神迹】真经典
磁力。【水】我来混来了 连续签到了几天
幽蓝焰。求飞机下降全过程 视频什么都行,thanks,要在驾驶舱里的,不要游戏视频
。。。 路过
幽蓝焰。国庆假爽啊 0v0v0v0v0v00v0v0v0v0v0v0v0v0v0v0v0v0v0
波板糖。【无聊了】我来发个贴子玩玩 .版本 2 .支持库 eAPI .支持库 spec .程序集 窗口程序集1 .子程序 __启动窗口_创建完毕标签1.标题 = “欢迎你登陆bb88的IP获取教程,你的主机名是:” + #换行符 + 到文本 (取主机名 ()) + #换行符 + #换行符 + “你的IP是:” + #换行符 + 到文本 (转换为IP地址 (取主机名 ())) .子程序 _按钮1_被单击编辑框4.内容 = 到文本 (通信测试 (“119.75.217.56”, )) ' 百度的IP地址 编辑框3.内容 = 到文本 (取IP地址 (“********”)) ' 我的主机名 编辑框1.内容 = 到文本 (转换为IP地址 (取主机名 ())) 编辑框2.内容 = 到文本 (取主机名 ()) 调试输出 (转换为IP地址 (“http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fwww.baidu.com%2F&urlrefer=800f0f60e0adc6fa089af090d7b53058”))
磁力。【呵呵】呵呵 呵呵
魔方。[原型]某句经典的话背后的秘密 1L增加神秘性
磁力。【头像】我换头像了 我来猥琐
= = = =
波板糖。【好东西】史上最完美的照片
魔方。[= =]关于小心分身的图
幽蓝焰。有关2012年世界末日 玛雅人是个很神秘的民族,他们的预言有99%都是正确的,他们曾经预言到汽车的出现和时间,而且他们知道“汽车”这个名次将会出现。而2012.12.21同时被两个民族预言到,一个是玛雅,一个是【我忘了】。所以,世界末日是这三种情况: 1.砖家已经发现了危险,但是为了不引起恐慌,就辟谣 2.砖家还没有发现危险,12.21可能是未知现象或外星人入侵 3.砖家没有发现危险,是因为有人已经移除了危险或做好移除危险的准备
磁力。【无聊】发帖 水水更健康
磁力。【格死】QAQ 唉
毕业的路过 表示我已经毕业一段时间了
磁力。【衣旧】8.1一水
磁力。【苹果】123 世界上有三个苹果改变了世界,大家知道是哪三个和他的结果及人物吗
幽蓝焰。这几天好忙啊 在外地,经常上不了网 在别人家,饭菜吃着不习惯,住着也不习惯 平常只能在电脑上学一会软件
磁力。【怪事】超级怪事 前段时间楼上搬上来了一个人,他在家中间放了一个沙盘,经常连续地打,结果声音很大,于是就去劝他。后来他搬走了,有一家人搬了进来,结果偶尔又出现了打沙盘的声音,但每次只响一声。于是又去找楼上新搬来的,结果他们并没有买沙盘,不可能发出声响。楼下是旅馆,而且正下方是办公室,没有沙盘之类的。我旁边的邻居也没有人有沙盘。这个偶尔发出来的沙盘的声音是从哪里来的?会不会是从建筑内部来的?
甜甜、【调查】大家对月球的看法
『有爱の同享』新人玩报道 我是天狼,来自天狼星。
波板糖。【新人】求认识 大家好,求认识
甜甜、【新人】求认识 我是来求认识的
磁力。【魔方】准备在小吧发帖 我来给大家看东西
魔方。「格式」报道 啦啦啦德玛西亚飞啊飞,嗯就是这样飞,没事了我看着你飞。
磁力。【发帖】我也不知道这贴是干嘛的 发这贴有莫名其妙的伤感
1
下一页