胶卷
来源:互联网 发布:java中缺省是什么意思 编辑:程序博客网 时间:2024/05/02 01:55
import javax.swing.JFrame;
public class 胶卷 extends JFrame implements Runnable {
private MoveLabel j = new MoveLabel(-200, this);
private MoveLabel j1 = new MoveLabel(-1200, this);
public 胶卷() {
this.setLayout(null);
this.setTitle("胶卷");
Thread th = new Thread(this);
th.start();
this.setSize(800, 600);
this.setVisible(true);
this.setDefaultCloseOperation(3);
this.setLocationRelativeTo(null);
}
public static void main(String[] args) {
胶卷 a = new 胶卷();
}
@Override
public void run() {
while (true) {
// int y = j.getY();
// int y1 = j1.getY();
// j.setLocation(0, y + 10);
// j1.setLocation(0, y1 - 10);
// if (y == 300) {
// j.setLocation(0, -1000);
// System.out.println(j);
// }
// if (y1 == 300) {
// j1.setLocation(0, -1000);
//System.out.println(j1);
// }
j.moves();
j1.moves();
try {
Thread.sleep(50);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
import java.awt.Container;
import java.awt.Image;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
public class MoveLabel extends JLabel {
public MoveLabel(int y, Container con) {
Image j = new ImageIcon("Img/love.jpg").getImage();
j = j.getScaledInstance(300, 1000, 1);
this.setIcon(new ImageIcon(j));
this.setBounds(250, y, 300, 1000);
con.add(this);
}
public void moves() {
int y = this.getY();
if (y > 800) {
y = -1190;
}
this.setLocation(this.getX(), y + 10);
}
}
- 胶卷
- 照相机(上)胶卷相机
- 给图片加上边框.(仿胶卷)
- 胶卷大总结,挺长的~~
- 给图片加上边框.(仿胶卷)
- CSS3+JavaScript效果:胶卷式放映
- 胶卷巨头柯达颓势背后的“中国启示”
- 【技巧】用iFunBox将照片传到相机胶卷中
- 交错(拉丝)(Interlace) 与 反胶卷过带
- 第24回 嗯?现在照相都不用胶卷啦?
- 保存图片到【相机胶卷】和【自定义相册】
- LabVIEW顺序结构是小时候相机里一帧一帧的胶卷
- 胶片的效果那真当钢钢滴啊,柯达克罗姆胶卷的前生今世
- iOS 关于相机胶卷,视频库,app内部中的视频播放方法
- iOS8开发之 PHAsset 保存图片到相册(相机胶卷) 详解一
- iOS8开发之 PHAsset 保存图片到相册(相机胶卷) 详解二
- iOS8开发之 PHAsset 保存图片到相册(相机胶卷) 详解三
- DxO FilmPack Elite V5.5.15特别版 | 模拟各种照片胶卷效果下载 | dxo filmpack 激活码
- Note For Linux By Jes(18)-X Window 配置介绍
- getopt笔记
- Cornfields - POJ 2019 单调队列
- Linux的7个运行级别
- HDU Largest prime factor && nyoj 520 最大素因子【素数】
- 胶卷
- java线程生命周期图解
- Spring 加载xml配置文件的方式 ApplicationContext
- 成为GEEK是个梦想,从这一刻出发。
- 3.GitHub译文之创建仓库分支
- presenting controller & presented controller 如何区分
- Android Api Demos登顶之路(五十三)Service Foreground Service Controller
- c#格式化数字
- SQL关于IN和EXISTS的用法和区别的比较