Updating a jpanel

so, there is a case in which the main character do something (in panel 2) and then the label in JPanel1 the label should be updated.I think that it should be similar to your logic but maybe is more that in my architecture something is wrong and every change should be done from "Main Class".

By moving sections of my code around I was able to get the map to display and add map points from a different method as a separate layer of the map.

I just realised that i had declared the original instance of file Panel as an instance of JPanle rather than panel loader. The problem I am have is when I try to click on my button to switch to the next Panel it doesnt update the current one to change.

I can now call the method from a non-static context. i have a jpanel that contains a scrollpane with a jtable in it. I am having a problem updating the contents of a JPanel inside a JFrame. In other words I want the destroy the panel I have up when I click a button ...

A lot of the answers I've found refer to setting markers by arrays, however that won't work in this case as the objects I'm tracking could be anywhere.

All worked out in the end so I suppose it wasn't a jpanel updating continuously question.

Leave a Reply