Mutators and also 'setters' (edit: too slow)
Type: Posts; User: Kewish
Mutators and also 'setters' (edit: too slow)
Welcome Bethany,
Brilliant introduction and what an asset to have amongst the community.
Welcome to JPF
How would you do it without a computer. Write out your steps in plain language on paper and be specific. Once you have that try and write these steps/tests as code.
Keep the loop simple. Let it...
Thought as much, assumed it was a combo of that and the "mate" in clyxee's thread title. We'll have to chat about your visit sometime.
Not sure Estonia is considered down under Greg ;) unless you're a resident of Finland maybe.
Welcome to JPF clyxee
JFrame by default is BorderLayout. You want to add the painting JPanel to BorderLayout.CENTER.
JPanels default is FlowLayout so add all your components for user interaction to a JPanel and add...
Welcome to JPF Chris!
Welcome to JPF Rod22dy
Welcome to JPF Dragos
Welcome to JPF TeelH
Welcome to JPF
Welcome. Enjoy your journey.
Hi Alex8 and welcome to JPF.
No one will write the code for you. What will happen if you post your code along with the problem you're having (include input, output and any exceptions/errors),...
Welcome
Clear the scanners buffer after you read a number.
// read a number
sc.nextLine(); // clear buffer
// read a String
Welcome to JPF Blergle, fascinating intro.
Enjoy your time here.
You are welcome and yes they are a vital source of information.
Do you what whitespace in your text file?
I.E. blank lines
Post your completed code along with any exceptions you get in the console or other output.
Create the File Object first. Then the Scanner with your newly created File object. Forget about DataInputStream. You will be using the Scanner.
--- Update ---
Here's a post from our very own...
FileNotFoundException will mean that it cannot find the file or it doesn't exist in that directory.
What is the path to your file?
What are you typing in for your input?
the path can be...
args is the array of command line arguments.
args [0] is a value from the array. And the datatype is a String.
Can you constuct a File object with that information? Yep.
Yep and what is args [0]???
Not InputStream itself, what did you pass to it rather?
What does File take in the contructor? Read here File Class - Constructor
What is args[0]??