{
public static void main(String args[]) throws Exception
{
final String searchTerm = "dolphin";
ClientRequestFactory client = initializeRequests();
// apply for api key at - http://www.flickr.com/services/api/keys/apply
FlickrResponse photos = client.get(photoSearchUrl,
FlickrResponse.class, args[0], "text", searchTerm);
JFrame frame = new JFrame(searchTerm + " photos");
frame.setLayout(new GridLayout(2, photos.photos.size() / 2));
for (Photo photo : photos.photos)
{
JLabel image = new JLabel(client.get(photoUrlTemplate,
ImageIcon.class, photo.server, photo.id, photo.secret));
image.setBorder(BorderFactory.createTitledBorder(photo.title));
frame.add(image);
}