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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Newbe question " Watch "Newbe question " New topic
Author

Newbe question

JeF Ald
Greenhorn

Joined: Mar 21, 2002
Posts: 19
i have been developing applets for a month or so and they work great but now i am trying to create different classes and be able to call the other classess for examble i have a login class and once that is validated i want the applet to be cleared and my MainMenu applet to be run and from there be able to call other applets by clicking next or enter i have not been able to accomplish this if anyone could please help i would be extremely greatefull


Jack of all trades, Master of none
Jason Kretzer
Ranch Hand

Joined: May 31, 2001
Posts: 280
If I am not mistaken you can set up several GUI's and then trigger a switch between the by changing the content pane of your main window.
Kind of like this: You have a JFrame as the main window. You make up several JPanels with different guis. You can use the setContentPane method of JFrame to switch between them.
HTH,


Jason R. Kretzer<br />Software Engineer<br />System Administrator<br /><a href="http://alia.iwarp.com" target="_blank" rel="nofollow">http://alia.iwarp.com</a>
Dave Wingate
Ranch Hand

Joined: Mar 26, 2002
Posts: 262
This might be too simple of an answer, but I'll throw it out any way. Why not change the layout manager of your applet to CardLayout since it is designed to easily switch the panel displayed in your gui?


Fun programming etcetera!
Younes Essouabni
Ranch Hand

Joined: Jan 13, 2002
Posts: 479
Isn't it possible to load several classes?


Younes
By constantly trying one ends up succeeding. Thus: the more one fails the more one has a chance to succeed.
Karl Laird
Ranch Hand

Joined: Jul 14, 2001
Posts: 67
I think what you really want to do is to use new frames rather than a whole new applet.
Rather that calling a standalone applet it would be better to have all the GUI for your application in different classes (rather than applets) and either (as previously mentioned) use card layout or the show() / hide() of the JFrame / whichever class to display / remove each GUI component.


The Eagle sneers at the Peacock<p>Systems Administrator<br />OrderWare Solutions Ltd<br /><a href="http://www.orderware.net" target="_blank" rel="nofollow">http://www.orderware.net</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Newbe question