/ Published in: Groovy
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// copyright Dierk Koenig 2006 import groovy.swing.SwingBuilder import javax.swing.* key = 'your-flickr-key-here' counter = 1 counter++ "method=flickr.interestingness.getList&per_page=1&" + "page=$counter&api_key=$key" "${photo.'@server'}/${photo.'@id'}_${photo.'@secret'}_m.jpg" button.text = photo.'@title' return button } title: 'Groovy Flickr Viewer', updateButton( button ( horizontalTextPosition: SwingConstants.CENTER, verticalTextPosition: SwingConstants.BOTTOM, actionPerformed: { updateButton(it.source) } )) } frame.pack() frame.show()