Note that red indicates a current out of the page, while blue represents a current into the page. If you double-click on any point you will see the field line that passes through that point.
You can click-and-drag any wire to change its position, as well as to see the force per unit length it experiences due to the magnetic field.
Pushing the "Current In" or "Current Out" buttons will add a straight wire carrying current either into the page or out of the page.
Note that you can modify the external field for the "Force on a wire" situation, or add an external field in any of the other cases, by entering functions in the "New Field" boxes. The first box gives the x-component of the field, while the second box sets the y-component. For a uniform field, set Bx and By to constant values. Try, say, Bx = y and By = x to see an example of a non-uniform field. The colors of the field vectors represent the strength of the field.
This simulation is based on a physlet by Wolfgang Christian, part of the physlets page at Davidson College.