Yeah, say if it was .println("ff"+deliveryName); it would show "ff"
Type: Posts; User: sibs
Yeah, say if it was .println("ff"+deliveryName); it would show "ff"
Yeah, I've tried it a few different ways and it still wont return any values.
Still getting the same problem, no value is being returned.
Sorry but java is not my strongest area, how would I go about doing that? Where would I place the System.out.println()?
Thanks for the help, now the output appears blank instead of null.
Get an error:
variable deliveryName might not have been initialized
That appears on the showMessageDialog screen when I enter the name in the nameField and then click submit on the JButton.
public void deliveryWindow(){
JFrame newFrame = new JFrame("Delivery Details");
Container pane = getContentPane();
newFrame.setLayout(new FlowLayout());
...
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:...
Sure:
cannot find symbol method getText()
I actually had that bit of code in my original post but I still keep getting the same error.
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
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...