Java Window/GUI Help  
Author Message
JayBee





PostPosted: 2004-12-16 12:13:00 Top

java-programmer, Java Window/GUI Help Ok im trying to create a program in java right now and my knowledge of
it has proved somewhat .... limited.....

Info:
Im making a program using javaspaces to simulate an auction over the
network.
Requirements:
1) user can add a lot to the auction
2) browse current lots on sale
3) users can withdraw their item from sale.

OK now this has to be done as a GUI which is what is hindering me.
The only type of GUI work i have done have been fairly static.
Just a plain window with a few buttons and such which might bring up a
picture or change some text in a text box or something.

But what im having trouble with now is the whole GUI design and how to
go about it.

Say i had 3 butons in my window |Add| |Browse| |withdraw|.
Clicking any of these should change the whole structure of the window
and i dont know how to do this..
Itd be a case of clearing half of the window off and redrawing over
the top of it.
Unless i went the route of having an extremely simple window with 3
buttons, clicking each would open up a new window with the desired
options...

What would be the best way to go about it? and how would i go about
implementing it? just a few tips are needed :)

Im really not a windows fan... a console app would take an hour or so.
This is gonna keep me going for aaaaaages :$

I hope im making sense and not babbing too much - 36 hours without
sleep and a huge abundance of caffeine is warping my mind o.O
 
Andrew Thompson





PostPosted: 2004-12-16 21:18:00 Top

java-programmer >> Java Window/GUI Help On Thu, 16 Dec 2004 04:12:35 +0000, JayBee wrote:

> Say i had 3 butons in my window |Add| |Browse| |withdraw|.
> Clicking any of these should change the whole structure of the window
> and i dont know how to do this..

You can have a cardlayout or JTabbedPane for the output components, or..

> Itd be a case of clearing half of the window off and redrawing over
> the top of it.
> Unless i went the route of having an extremely simple window with 3
> buttons, clicking each would open up a new window with the desired
> options...

Put each in a Dialog, JDialog or JOptionPane.

Do the Sun GUI/Layout tutorial for ideas.

HTH

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane