- color:線の色(java.awt.Color)
- thickness:線の太さ
- roundedCorners:角丸指定
import java.awt.* import javax.swing.* import groovy.swing.* sb = new SwingBuilder() sb.edt { frame( title: "line border example", show: true, resizable: true, pack: true, defaultCloseOperation: WindowConstants.EXIT_ON_CLOSE ){ label(text:"example label1", constraints: BorderLayout.NORTH, border:lineBorder(color:new Color(0x77, 0x99, 0xdd), thickness:8) ) label(text:"example label2", constraints: BorderLayout.CENTER, border:lineBorder(color:new Color(0xff, 0xff, 0xbb), thickness:8, roundedCorners:true) ) label(text:"example label3", constraints: BorderLayout.SOUTH){ lineBorder(color:Color.WHITE, thickness:8, parent:true) } } }実行時画面
動作環境
groovy 2.2.2, JDK 1.7 update55
0 件のコメント:
コメントを投稿