Search:

Type: Posts; User: sibs

Search: Search took 0.07 seconds.

  1. Replies
    32
    Views
    3,090

    Re: Having trouble storing variable from JTextField

    Yeah, say if it was .println("ff"+deliveryName); it would show "ff"
  2. Replies
    32
    Views
    3,090

    Re: Having trouble storing variable from JTextField

    Yeah, I've tried it a few different ways and it still wont return any values.
  3. Replies
    32
    Views
    3,090

    Re: Having trouble storing variable from JTextField

    Still getting the same problem, no value is being returned.
  4. Replies
    32
    Views
    3,090

    Re: Having trouble storing variable from JTextField

    Sorry but java is not my strongest area, how would I go about doing that? Where would I place the System.out.println()?
  5. Replies
    32
    Views
    3,090

    Re: Having trouble storing variable from JTextField

    Thanks for the help, now the output appears blank instead of null.
  6. Replies
    32
    Views
    3,090

    Re: Having trouble storing variable from JTextField

    Get an error:
    variable deliveryName might not have been initialized
  7. Replies
    32
    Views
    3,090

    Re: Having trouble storing variable from JTextField

    That appears on the showMessageDialog screen when I enter the name in the nameField and then click submit on the JButton.
  8. Replies
    32
    Views
    3,090

    Re: Having trouble storing variable from JTextField

    public void deliveryWindow(){

    JFrame newFrame = new JFrame("Delivery Details");

    Container pane = getContentPane();
    newFrame.setLayout(new FlowLayout());
    ...
  9. Replies
    32
    Views
    3,090

    Re: Having trouble storing variable from JTextField

    Thanks for the replies. I have changed my code around a bit.
    Inside in pizzaMenu(), I have put
    deliveryName = nameField.getText();
    Inside in public void actionPerformed(ActionEvent e)
    I have put:...
  10. Replies
    32
    Views
    3,090

    Re: Having trouble storing variable from JTextField

    Sure:
    cannot find symbol method getText()
  11. Replies
    32
    Views
    3,090

    Re: Having trouble storing variable from JTextField

    I actually had that bit of code in my original post but I still keep getting the same error.
  12. Replies
    32
    Views
    3,090

    Re: Having trouble storing variable from JTextField

    Thanks for your reply, this is where I get the error

    name1 = nameField.getText();

    How do I go about getting my script to access the nameField?
    Thanks
  13. Replies
    32
    Views
    3,090

    Having trouble storing variable from JTextField

    Hi,
    I want the user to input their name etc into a Jtextfield and it will return their details, but I keep getting an error saying cannot find symbol getText()
    Here is my code


    public void...
Results 1 to 13 of 13