I have a program with 2 panels, each with it's own class.
LeftPanel and RightPanel.
Whenever I click a button that does some calculations (like calculating total assets amount) in one of the panels, it doesn't update that info for the other panel.
For example....I have this seperate class that both the panel classes call on
public class Money {
public int money;
public boolean first_run;
public Money(int money){
this.money = money;
}
public int getMoney(){
if (first_run==false){
money = 100;
first_run=true;
}
return money;
}
public void setMoney(int money){
this.money = money;
}
}
When I setMoney in the RightPanel, I need it to change the textarea in LeftPanel.
Is it something like repaint()? Or some other method that I'm unaware of? (plz show how it might work too since I'd be unfamiliar with it)
Much Gracias,
Slyvr