0

Possible Duplicate:
Issue regarding dynamically loading Images in loop using Java Swing

Can any one tell how I would add images dynamically using for loop in JToolBar. I tried a lot but it didn't work for dynamic loading of images. I want to create ToolBar where I load images in a loop.

Community
  • 1
  • 1
Faizan Ahmed
  • 93
  • 2
  • 4

1 Answers1

2

JToolBar is particularly well adapted to adding JButton instances each having a distinct Icon, so I would advocate using ImageIcon. Complete examples maybe found here, and more were cited in comments to an answer to your previous question.

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045