Results 1 to 3 of 3
- 12-27-2009, 07:55 PM #1
Member
- Join Date
- Dec 2009
- Posts
- 55
- Rep Power
- 0
Can you have multiple layouts using swing?
Might be a stupid question ill keep reading but, if anyone wants to elborate some tips to learning gui and swing ,a student is listening .
my q poped up when i came across this page.
A Visual Guide to Layout Managers (The Java Tutorials > Creating a GUI With JFC/Swing > Laying Out Components Within a Container)
- 12-27-2009, 08:33 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,601
- Blog Entries
- 7
- Rep Power
- 17
Your question is in the topic title? If so, no, a component can only have one LayoutManager at the same time; this is not really a restriction because all components are containers as well, so each component can have more than one (other) component as its children and each child can have its own LayoutManager again. A JPanel is the ideal candidate for a child component.
Before you build up your components like this (and everybody does this) draw your design on a piece of paper and define which component carries what other components and uses which LayoutManager. It pays back if you do that before you start banging your keyboard.
kind regards,
Jos
- 12-27-2009, 09:38 PM #3
Member
- Join Date
- Dec 2009
- Posts
- 55
- Rep Power
- 0
i have what i want to do planned out , in another thread right now "combining these 2 projects" . Right now im just playing with adding components . Im looking over the dif layouts and i like the border layout for the project im working on and but, idk if you add the tabs to the layout or the layout to the tabs .
Similar Threads
-
map javax.swing.text.Element to javax.swing.text.View
By elizabeth in forum New To JavaReplies: 1Last Post: 07-30-2007, 07:02 PM -
Layouts ?
By plodos in forum EclipseReplies: 3Last Post: 07-30-2007, 03:03 PM -
Printing Swing components in multiple pages
By Rajeswari in forum New To JavaReplies: 1Last Post: 07-27-2007, 05:49 PM -
Printing Swing components in multiple pages
By Rajeswari in forum AWT / SwingReplies: 0Last Post: 07-27-2007, 05:01 PM -
multiple databases
By varunthecool in forum JDBCReplies: 2Last Post: 07-09-2007, 08:06 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks