Ok,hello everyone, First I'll show what I have:
I have this code:
public static void main(String[] arg) throws IOException {
map = new DefaultMapContext();
map.setTitle("Visualizador UD - Geotools");
mapFrame = new JMapFrame(map);
mapFrame.enableToolBar(true);
mapFrame.enableStatusBar(true);//Herramientas abajo
JToolBar toolBar = new JToolBar();
eliminar = new JButton("Eliminar capas");
adicionar = new JButton("Adicionar capas");
consultar = new JButton("Consultar");
mapFrame.getToolBar().add(adicionar);
mapFrame.getToolBar().add(eliminar);
mapFrame.getToolBar().add(consultar);
listaLayers = new List();
for (int i = 0; i < files.length; i++) {
listaLayers.add(files[i].getName());
}
menu();
mapFrame.add(listaLayers, BorderLayout.WEST);
mapFrame.add(toolBar, BorderLayout.NORTH);
mapFrame.setSize(800, 600);
mapFrame.setVisible(true);
}
Well, My goal is something like that, the same organization:
But I don't know what to do, It's a little confusing for my, the problem is the Layers, I can't put it to the left of the map... I hope you can help me to put in a better way my code.