Paul Taylor
Paul Taylor

Reputation: 13210

Is there a widget for making configurable toolbar in java

Is there a widget for making configurable toolbar in java ?

Couldnt find anything in swingx but seems a common problem

Upvotes: 2

Views: 149

Answers (1)

trashgod
trashgod

Reputation: 205785

Use instances of Action to expose your application's functionality. Add these actions to your toolbar buttons. Because JToolBar is a Container you can add() and remove() buttons as needed in your toolbar editor by invoking revalidate() and repaint(). You can persist the current settings as suggested here.

Upvotes: 1

Related Questions