I'm not much of a Java guy, but per this it looks like metadata needs to be set on your containers, with a key of X-Container-Meta-Access-Control-Allow-Origin, and a value of a space separated list of allowed origins.
Thus you need to use whatever function is used to set container metadata for the jclouds API.
It appears that this could be done on creation like so (based on adaptation of this code):
CreateContainerOptions options = CreateContainerOptions.Builder
.withMetadata(ImmutableMap.of("Access-Control-Allow-Origin", "*"));
swift.getApi().createContainer(Constants.CONTAINER, options);
Looking through the docs, I found the following function in org.jclouds.openstack.swift.CommonSwiftClient:
boolean setContainerMetadata(String container,
Map<String,String> containerMetadata)
It therefore looks like you should be able to do what you're looking for with something like the following:
swift.getApi().setContainerMetadata(container, ImmutableMap.of("Access-Control-Allow-Origin", "*"));