Results 1 to 5 of 5
Thread: Page Navigation
- 04-16-2012, 10:29 AM #1
Member
- Join Date
- Apr 2012
- Location
- Kilkenny, Ireland
- Posts
- 3
- Rep Power
- 0
- 04-16-2012, 11:44 AM #2
Re: Page Navigation
CardLayout or JTabbedPane.
In future, please post Swing related questions in the AWT/Swing section.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 04-16-2012, 12:49 PM #3
Member
- Join Date
- Apr 2012
- Location
- Kilkenny, Ireland
- Posts
- 3
- Rep Power
- 0
Re: Page Navigation
Thanks :)
Would it be considered bad practise to remove all components and then add the neccessary ones again?
As in:
The reason I ask is because each page will have separate database queries on them so if they were all loaded at the start with a layout would that slow it all down?Java Code:// User presses a button to pull up page2 getContentPane().removeAll(); // This removes the current page, sidebar and header guiDesign(); // This repaints the sidebar and header getContentPane().add(page2, BorderLayout.CENTER); // This will paint page2
- 04-16-2012, 02:31 PM #4
Re: Page Navigation
Yes.
You can do a lazy loading: load each 'page' when it is to be shown for the first time.The reason I ask is because each page will have separate database queries on them so if they were all loaded at the start with a layout would that slow it all down?
Database access should be done in a Thread other than the EDT. Find and go through the tutorial on Concurrency in Swing to know your options for that.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 04-17-2012, 05:36 PM #5
Member
- Join Date
- Apr 2012
- Location
- Kilkenny, Ireland
- Posts
- 3
- Rep Power
- 0
Similar Threads
-
navigation b/w frames
By imrankhan in forum AWT / SwingReplies: 3Last Post: 03-19-2012, 12:25 PM -
File Navigation?
By Moncleared in forum New To JavaReplies: 3Last Post: 01-07-2011, 01:51 AM -
navigation in jsf
By riya_nap in forum JavaServer Faces (JSF)Replies: 0Last Post: 10-04-2010, 08:53 AM -
Page to page navigation
By leovach in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 05-17-2010, 09:29 AM -
Wep page navigation buttons
By anthony417 in forum Advanced JavaReplies: 1Last Post: 07-26-2007, 08:40 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks