How to programmatically add the vtkSeedWidget or vtkSphereWidget

How to programmatically add the vtkSeedWidget or vtkSphereWidget,then execute widgetManager.enablePicking(), and you can drag the widget with the mouse

Thanks.

Isn’t placeWidget working ?

My requirement is for the program to automatically generate the vtkSeedWidget upon loading, rather than requiring a mouse click to do so