NetCDF attributes

I can display my netCDF file using code from DisplayTest, case 10.
However, I cannot figure out how to query the attributes of the file.
In my test netCDF file I use variables (x, y) -> documents.  Where x goes
from 1-30 and y goes from 1-40.  I will not always know this apriori.  If
I read this file as

  java DisplayTest 10 equinox.nc

it displays as expected.  My question is how can I query the range of
the x and y variables.  When I try

  double[] range1lat = map1lat.getRange();

where map1lat is

  new ScalarMap((RealType) dtype.getComponent(0),Display.XAxis));

NaN is returned.  I tried various other combinations of methods and
could not produce the simple result of 1,30 and 1,40 for (x,y).  Any
suggestions?

Another question.  I have a JTable.  I would like the cursor on the
surface to reflect the proper entry in the JTable.  Which method
returns the (x,y) position of the cursor on the 3-D surface?  From
this I can compute the appropriate entry in the JTable.

Thanks in advance for any advice.