@ -1,3 +1,5 @@
|
||||
package com.mashibing.tank;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
@ -1,3 +1,5 @@
|
||||
package com.mashibing.tank;
|
||||
|
||||
/**
|
||||
* @Description: 方向枚举
|
||||
* @Author: zhanxinlin
|
@ -1,3 +1,5 @@
|
||||
package com.mashibing.tank;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.KeyAdapter;
|
||||
import java.awt.event.KeyEvent;
|
@ -1,3 +1,5 @@
|
||||
package com.mashibing.tank;
|
||||
|
||||
/**
|
||||
* @Description: 程序启动入口
|
||||
* @Author: zhanxinlin
|
After Width: | Height: | Size: 824 B |
After Width: | Height: | Size: 868 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 936 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 8.0 KiB |
After Width: | Height: | Size: 8.0 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 855 B |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 852 B |
After Width: | Height: | Size: 847 B |
After Width: | Height: | Size: 312 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1022 B |
After Width: | Height: | Size: 814 B |
After Width: | Height: | Size: 460 B |
After Width: | Height: | Size: 280 B |
After Width: | Height: | Size: 565 B |
After Width: | Height: | Size: 846 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 864 B |
After Width: | Height: | Size: 863 B |
After Width: | Height: | Size: 861 B |
After Width: | Height: | Size: 863 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 670 B |
After Width: | Height: | Size: 680 B |
After Width: | Height: | Size: 677 B |
After Width: | Height: | Size: 660 B |
After Width: | Height: | Size: 691 B |
After Width: | Height: | Size: 674 B |
After Width: | Height: | Size: 271 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.3 KiB |
@ -0,0 +1,33 @@
|
||||
package test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* 读取图片测试类
|
||||
*/
|
||||
class ImageTest {
|
||||
|
||||
@Test
|
||||
void test() {
|
||||
|
||||
try {
|
||||
// 读取图片路径写死,不推荐
|
||||
// BufferedImage image = ImageIO.read(new File("C:/work/javaprojects/Tank_60/src/images/bulletD.gif"));
|
||||
// assertNotNull(image);
|
||||
|
||||
BufferedImage image2 = ImageIO.read(ImageTest.class.getClassLoader().getResourceAsStream("images/bulletD.gif"));
|
||||
assertNotNull(image2);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|