Recipe 9.18 Adding Images to Table Items


9.18.1 Problem

You want to add images to table items.

9.18.2 Solution

To give a table item an image, call the item's setImage method.

9.18.3 Discussion

Just pass a table item's setImage method an Image object to give the item an image. For more on creating Image objects, take a look at Recipe 9.9 earlier in this chapter.

9.18.4 See Also

Recipe 9.9 on creating image menu items; Recipe 9.14 on creating tables; Recipe 9.16 on adding check marks to items in a table; Recipe 9.17 on enabling and disabling items in a table.

Eclipse Cookbook
Inside XML (Inside (New Riders))
ISBN: 596007108
EAN: 2147483647
Year: 2006
Pages: 232
Authors: Steve Holzner

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: