Using examples I found, I was able to connect to a webservice, download a world map and have it display properly in a JMapPane. My goal is to have the JMapPane only display a very specific portion of the world.
I have a geographic CRS based on NAD83 and UTM 17N. I prefer to use Northing and Easting values, for which I have the bounds of the area I wish to display.
Here is the relevant code:
Rectangle bounds=projectdata.getPlanRange();
ReferencedEnvelope envelope = new ReferencedEnvelope(bounds.getMinX(), bounds.getMaxX(), bounds.getMinY(), bounds.getMaxY(), projectdata.getWorkPlancrs());
mapPane.setDisplayArea(envelope);
If I don't set the displayarea with the envelope, I see the world. If I set it, it gives me a view of water somewhere in the world. I can only assume that the ReferencedEnvelope can handle Northing/Easting values with a geographic CRS provided. I've read the documentation a few times and searched a long time before posting this question. I'm sure there is a simple answer as to what I'm doing wrong.
In case it matters at all, the wms source I am using is
http://atlas.gc.ca/cgi-bin/atlaswms_en?VERSION=1.1.1&Request=GetCapabilities&Service=WMS