制作这个界面需要jdk1.6update10以上的版本,因为使用了透明窗体。
完成的界面如下:
这里只列出部分关键代码:
首先是制作圆角界面:
Shape shape = null;
shape = new RoundRectangle2D.Double(0, 0, width, height, 5.5D, 5.5D);
AWTUtilities.setWindowShape(frame, shape);
制作渐变:
final Paint p = new GradientPaint(0.0f, 0.0f, new Color(R, G, B, 100),getWidth(), getHeight(), new Color(R, G, B, 200), true);
界面描边:
Shape shape = null;
shape = new RoundRectangle2D.Double(0, 0, frame.getWidth......
阅读全文