showBounds.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (tree.getSelectedLayers().get(0).bounds != null) {
SlippyMapBBoxChooser mapPanel = new SlippyMapBBoxChooser();
mapPanel.setBoundingBox(tree.getSelectedLayers().get(0).bounds);
JOptionPane.showMessageDialog(null, mapPanel, tr("Show Bounds"), JOptionPane.PLAIN_MESSAGE);
} else {
JOptionPane.showMessageDialog(null, tr("No bounding box was found for this layer."),
tr("WMS Error"), JOptionPane.ERROR_MESSAGE);
}