aspose file tools
The moose likes Beginning Java and the fly likes small application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "small application " Watch "small application " New topic

small application

Sartaj Syed

Joined: Nov 11, 2001
Posts: 22
I have three files all of which are compiling.
One of them is a main screen with two buttons one when clicked should access the second file (an input screen) and when the second is clicked it should access the third file(a feedback screen) . I am unable to link them . What is the best way to do this. the code for the main file is as follows

(edited by Cindy to format code)
[ January 24, 2002: Message edited by: Cindy Glass ]
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
Code tags please.
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Sartaj,
You should either use dialogs or frames and only show the other classes once the buttons are clicked. Each separate dialog or frame should allow registering listeners so that your main frame can register as a listener. For example, hitting the input button brings up the Input frame. Your main frame registers itself as a listener of the Input frame. Once the user has filled in all the required inputs they hit some Apply or Accept button and your registered main frame gets the event. Then the main frame can query the input frame for the inputs specified. Once the inputs are queried, the main frame can dipose of the input frame.
I hope you get the idea. Each class can then validate its own user settable items.
jQuery in Action, 2nd edition
subject: small application