JAVA 项目笔记

JAVA 项目笔记

标签(空格分隔): 工具使用


之前一直不知道怎么几个人一起写一个JAVA项目,只要是因为用github的时候classpath每个人都不一样,然后上网搜一堆没有get到要点,实际很简单,

githubclasspath,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);
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值