First post. with a java question
well hello to all. i am new to this forum, i joined because i am having some problems with a program i am trying to write.
i am in computer programming class, and we are having to write a program that reads information from 2 files. there has to be a dialog box that lets the user choose which file to read from.
once the choice is chosen, the program has to take the information from that file and turn it into a tri-color flag. the orientation of the flag (vertical/horizontal ) depends on the chosen file.
it is not an applet. it has a flag class that will hold the information from the file. and it has a constructor/tester. and then there is the viewer.
so i know the basics of what i want this program to do. but i dont know where to start as far as the actual coding goes. i am sure i should know more than i do, but my teacher is rubbish. i have a decent starting place i think, but it does not run nor does it completely compile.
my tester works, but my other components do not.
my classes are the tester/constructor, the flagPanel and the flags
i guess i should ask where should i put the "thing" that asks the user what file to load? would that go in my flagPanel class?
and i g=have all my gets and sets in my flags class.
and the Tester just has the code to display the box all this will go into.
thanks! and sorry for the long post.
any advice would be greatly appreciated.
Re: First post. with a java question
Post length is not the issue here. The lack of capital letters at the start of each sentence and for the singular first person 'I' makes it difficult to read.
sorry for the long post.
Read the API for JFileChooser and follow the link to the tutorial on How to Use File Choosers. Once you have gone through that tutorial, you will be better placed to make an informed decision.
where should i put the "thing" that asks the user what file to load?