This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am in need of assistance with regards as to how to update a JLabel on a JPanel - when an array is updated.
My main program passes in an arrayList to another JFrame program ( and I am able to confirm that the data in the arrayList has been passed into the program ). However, the jLabels are not being updated on the GUI when the program is ran. However, when I use the MOUSE to click on a section of the map I am able to update the map utilizing the mouse clicked and listener and I am then displaying the data from the arrayList.
I am using the same method (see below) to populate the labels so I know it works.
I know I need to employ an action listener to have the labels updated, but I have scoured the web to look for an example that utilizes a listener to update a JLabel and I have not been able to find one.
If anyone could offer assistance it would be greatly appreciated.