hi there i have a conceptual question...
i have a gui, which reads keystroke events attached to a textfield
ie
|
Code:
|
class Myclass extends JFrame implements ActionListener,KeyListener {
constructor....
public void keyPressed(KeyEvent e)
{
System.out.println(" a key has been pressed ");
System.out.println(" a key code "+e.getKeyCode());
System.out.println(" a key char "+e.getKeyChar());
}
} |
no i am trying to keep a seperation between the gui and the backend... so the backend will store and adjust the data ...
ie
|
Code:
|
class back{
private int total =;
constructor...
get/set total(); |
my question is can i link the adjustment of the total in the back class, everytime a keystroke is fired in the gui...?
is it that i add a listener to the back class???
the whole idea being here to keep a logical and functional seperation between the gui and the data manipulation part....
thanks