Hi, trying to figure out why my JTextField 'scInput' cannot be seen in another class?
I define it in class 'gui' as
private JTextField scInput;
within the public class
public class Gui extends JFrame
implements ActionListener
But when trying to call it in another class, its not being resolved...
public String setStockCode()
{
new Gui();
stockCode = scInput.getText();
}
even after i make a new instance of Gui()
anyone got any ideas?
Thanks
I define it in class 'gui' as
private JTextField scInput;
within the public class
public class Gui extends JFrame
implements ActionListener
But when trying to call it in another class, its not being resolved...
public String setStockCode()
{
new Gui();
stockCode = scInput.getText();
}
even after i make a new instance of Gui()
anyone got any ideas?
Thanks