JAVA 项目笔记
标签(空格分隔): 工具使用
之前一直不知道怎么几个人一起写一个JAVA项目,只要是因为用github的时候classpath每个人都不一样,然后上网搜一堆没有get到要点,实际很简单,
每个人传到github的时候不要加入classpath,然后用Eclipse新建项目
每
个
人
传
到
g
i
t
h
u
b
的
时
候
不
要
加
入
c
l
a
s
s
p
a
t
h
,
然
后
用
E
c
l
i
p
s
e
新
建
项
目
新建的目录和pull下来的文件设置成一样的,名字也和原来的一样,大概就是覆
新
建
的
目
录
和
p
u
l
l
下
来
的
文
件
设
置
成
一
样
的
,
名
字
也
和
原
来
的
一
样
,
大
概
就
是
覆
然后Eclipse会自己生成.classpath
然
后
E
c
l
i
p
s
e
会
自
己
生
成
.
c
l
a
s
s
p
a
t
h
Text自动换行学习链接
text = new Text(composite, SWT.BORDER | SWT.MULTI);
java Label显示可缩放图片代码
String path = "http://oh9ex6wd2.bkt.clouddn.com/me.jpg";
ImageRegistry imageRegistry = new ImageRegistry();
imageRegistry.put("Exist", ImageDescriptor.createFromURL(new URL(path)));
} catch (MalformedURLException e1) {
e1.printStackTrace();
}
Image image0 = imageRegistry.get("Exist");
ImageData imageData0 = image0.getImageData();
int width = label_picture.getBounds().width;
int height = label_picture.getBounds().height;
System.out.println(width);
System.out.println(height);
ImageData imageData1 = imageData0.scaledTo(width, height);
width = imageData1.width;
height = imageData1.height;
System.out.println(width);
System.out.println(height);
Image image = new Image(null, imageData1);
label_picture.setImage(image);