文件
- Swing Builder 這個官方的說明提供幾個簡單的範例。
- GUI Programming with Groovy 提供各種 Builder 的詳細說明(但範例相當不完整)。
設定外觀(LookAndFell)
frame (...) {
lookAndFeel('system') //配合各種作業系統的原生介面(推薦)
}
很棒的 actionPerformed 事件實作(使用 Groovy Closure)
button (text: 'Click Me', actionPerformed: {
println "You hurt me."
})
很棒的表格布局(TableLayout)
tableLayout {
tr {
td {
label (text: 'colname')
}
td {
textField (text: 'something')
}
}
}
Ubuntu Unity 桌面會發生視窗標題列消失問題
frame (..., locationRelativeTo: null)
使用 Mac OS X 風格的選單(選單移到最上方)
System.setProperty("apple.laf.useScreenMenuBar", "true")
沒有留言:
張貼留言