aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes link from menubar to the selected page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "link from menubar to the selected page" Watch "link from menubar to the selected page" New topic
Author

link from menubar to the selected page

sae0203
Ranch Hand

Joined: Sep 19, 2002
Posts: 34
File
------------------------------------------
View -->Customer
-->Product
-->Order
-->Inventory
-->Invoice
Create New
Update
Delete
----------
Exit
from the view, customer... how can i open the customer page and hide the currentpage
let's say it is (Inventory)?


SAE <br /> <br /><a href="http://www.findsingapore.net/forum" target="_blank" rel="nofollow">http://www.findsingapore.net/forum</a>
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Look at CardLayout... it lets you "flip" between different panels in the layout...


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
sae0203
Ranch Hand

Joined: Sep 19, 2002
Posts: 34
The problem is i dun want a cardlayout...
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Ummmm... that's a big problem... because you SHOULD...

jrookie
Greenhorn

Joined: Aug 20, 2002
Posts: 17
i think you wanna set some data in frame from your menu. so why you not put this data in frame and use frame.repaint()?
sae0203
Ranch Hand

Joined: Sep 19, 2002
Posts: 34
heeheee... i really not familiar with java... how does the frame.repaint() works?
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

"jrookie" -

Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it here.

Thanks! and welcome to the JavaRanch!
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

repaint() isn't exactly the method you are looking for... I think jrookie is saying that you can dynamically add and remove components from your frame. You can use the remove() and add() methods... then you'll need to call invalidate() or validate(), not repaint(). However, all of this is handled much more understandably by using CardLayout... which is why I'm unsure of why you don't want to use it...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: link from menubar to the selected page