怎样为组件绘制圆角边框 我想给jpanel添加一个圆角的边框,请问如何绘制?多谢。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如果是那样的话 你可以计算一下 用drawLine和drawRect方法 找出八个点 连接起来就OK拉 LineBorder 支持圆角LineBorder(Color color, int thickness, boolean roundedCorners) int offs = this.thickness; int size = offs + offs; if (this.roundedCorners) { int arc = offs + size; outer = new RoundRectangle2D.Float(x, y, width, height, arc, arc); inner = new RoundRectangle2D.Float(x + offs, y + offs, width - size, height - size, arc, arc); } rxtx串口开发问题 关于使用marshaller生成xml文件的一个问题 请高手帮忙给我看看gui 大家帮个忙! 迷惑 Output_InputDeme.java编译通过了但老说我没有主类 500分寻求一递归算法(急):测试成功后马上给分 struts2与jsp之间的交互 watool na li you zhe fang mian de shu ji a 用JMF开发基于Web的实时流媒体系统?? 能讲一下struct 【约瑟夫环的问题】
你可以计算一下
用drawLine和drawRect方法 找出八个点 连接起来就OK拉
LineBorder(Color color, int thickness, boolean roundedCorners) int offs = this.thickness;
int size = offs + offs;
if (this.roundedCorners) {
int arc = offs + size;
outer = new RoundRectangle2D.Float(x, y, width, height, arc, arc);
inner = new RoundRectangle2D.Float(x + offs, y + offs, width - size, height - size, arc, arc);
}