//Add a slider to set the brush width
MTSlider slider = new MTSlider(0, 0, 200, 38, 0.05f, 2.0f, pa);
slider.setValue(1.0f);
frame.addChild(slider);
slider.rotateZ(new Vector3D(), 90, TransformSpace.LOCAL);
slider.translate(new Vector3D(-7, 325));
slider.setStrokeColor(new MTColor(0,0,0));
slider.setFillColor(new MTColor(220,220,220));
slider.getKnob().setFillColor(new MTColor(70,70,70));
slider.getKnob().setStrokeColor(new MTColor(70,70,70));