javax.swing question

Soldato
Joined
22 Oct 2005
Posts
2,893
Location
Moving...
I've been given an assignment where I have to develop a Java applications making use of the javax.swing UI. The basic spec is:
-There must be 4 classes: (The stuff in brackets are what it must do/contain)
Person (Contains info on the person, name/email etc)
Contacts (Array of contacts)
PersonPanel (extends JPanel)
ContactsGUI (extends JFrame and implements appropriate listeners)

Now it's the last 2 parts I dont understand, the GUI basically needs to have one window, a toolbar at the top and bottom with some simple buttons (next contact/add contact etc) with a picture of the contacts and details in the middle. I understand the very basics of java and the swing interface but I cant seem to find a tutorial or something similar that has 2 classes to create this one window. It doesn't make sense to me.

Could someone either explain to me what kind of thing I should have in each of the latter classes, or point me in the direction of a good guide?

Thanks very much.
 
Thanks Una, but it says that ContactsGUI and PersonPenal must be 2 classes, I'm new to java and I dont really know very much at all but in all the projects I have done so far when it says use X number classes, I have created X number of different classes in the source package. So in this case I would create a personPanel.class and a ContactsGUI.class.

Is this completely wrong then? Sorry I really am useless :o !

(I hope I am wrong because I currently have the exact code you wrote above :D )
 
Back
Top Bottom