private void suggestLevels() {
String levelNum = JOptionPane.showInputDialog("Level Numbers:");
try {
jListLevelsModel.removeAllElements();
int num = Integer.valueOf(levelNum);
Map map = app.getMap();
ReferencedEnvelope fullEnv = map.getFullExtent();
int width = app.getMapPane().getWidth();
int height = app.getMapPane().getHeight();
int dpi = Integer.valueOf(this.jTextFieldDPI.getText());
double maxResolution = map
.computeResolution(fullEnv, width, height);
double maxScale = map.computeScale(fullEnv, width, height, dpi);
for (int i = 0; i < num; i++) {
TileLodInfo info = new TileLodInfo();
double factor = Math.pow(2, i);
info.setResolution(maxResolution / factor);
info.setScale(maxScale / factor);