Re: How do I add a new button to the toolbar in the Sweet Home 3D applet?

by Puybaret » Sat Jan 29, 2011 5:18 pm

In the method createHomeController of the com.eteks.sweethome3d.applet.AppletApplication class, you should call:

Code: Select all

toolBar.add(getToolBarAction(homeView, HomeView.ActionType.SPLIT_WALL));
at the place you want to insert the button.

If you want to program a new button, implement a new Action and its actionPerformed method, then add the action to the toolbar.
If you want to change its icon use the SMALL_ICON value of an action.