I created a GUI. with a bunch of classes (that extended JPanel) and one that extends JFrame and now I can't figure out how to transfer data between them. lets say I have a public variable set in the JFrame class and a get method like the one below:
public double getBalance()
{
return balance;
}
How do i access this get method from one of the panel classes so I can update the GUI? I tried adding:
double b=atmEngine.getBalance();
but it gave me this error:
non-static method getBalance() cannot be referenced from a static context
I thought about designing a send method from my launcher but I just don't understand how this works!
(Btw this is my first large GUI program sorry for all the questions I am trying as hard as I can to figure it out myself :P)
Thank so much,
PO.