This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes How to navigate in a standalone application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to navigate in a standalone application" Watch "How to navigate in a standalone application" New topic
Author

How to navigate in a standalone application

Chris Creed
Ranch Hand

Joined: Feb 27, 2009
Posts: 67

Hello all.

I'm authoring a simple program, has a few different menu options, that sort of thing. However what I'm wondering is when you make such a program, how do switch to another section of your program when say you click on a menu option or what not. If it was a web application it'd be as simple as having a link and loading a new page for the user, but for a standalone application I'm at a loss. I hope I've explained this decently enough as to what I' trying to explain, and that someone can point me to how this can be done.

EDIT: The application situation in question would be a GUI based app.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41144
    
  45
That sounds like a use case for a java.awt.CardLayout: http://java.sun.com/docs/books/tutorial/uiswing/layout/card.html


Ping & DNS - my free Android networking tools app
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38046
    
  22
Command-line or Swing GUI?
Chris Creed
Ranch Hand

Joined: Feb 27, 2009
Posts: 67



That could work with some "pages" that I was thinking of for an app actually.
Campbell Ritchie wrote:Command-line or Swing GUI?


Swing GUI.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to navigate in a standalone application
 
Similar Threads
Menus and replacing the prompts fr JFrame
Run Web Application on network
NullPointer on Simple EJB injection
Connect Automatically to Database on program start up
begining level of web service