aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Alignment in Flowlayout: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Alignment in Flowlayout:" Watch "Alignment in Flowlayout:" New topic
Author

Alignment in Flowlayout:

Narasimha Rao B.
Ranch Hand

Joined: Aug 26, 2002
Posts: 205
Please see the question and answer.
How do you indicate where a component will be positioned using Flowlayout?
1) North, South,East,West
2) Assign a row/column grid reference
3) Pass a X/Y percentage parameter to the add method
4) Do nothing, the FlowLayout will position the component
Answer - 4.
My concern: Answer should be 1. Because Flowlayout class provides constructors which allow the alignment.
i.e. Flowlayout(int alignment)
and alignment value can be LEFT/CENTER/RIGHT.


Narasimha
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12678
    
    5
I think you are supposed to recognize the north south east west words as being used for BorderLayout and thus not appropriate for FlowLayout.
Bill


Java Resources at www.wbrogden.com
Narasimha Rao B.
Ranch Hand

Joined: Aug 26, 2002
Posts: 205
Hi William,
Thanks for your reply. Sorry, my questions is wrongly framed, i will agree north south east west words should be used in Boarderlayout not in Flowlayout. But what is meant by keywords left,right and center used in Flowlayout to layout the component, can't we use these to position the component.
Francis Siu
Ranch Hand

Joined: Jan 04, 2003
Posts: 867
hi narasimha
My concern: Answer should be 1. Because Flowlayout class provides constructors which allow the alignment.
i.e. Flowlayout(int alignment)
and alignment value can be LEFT/CENTER/RIGHT.

I am sorry that the default Layout using the
1) North, South,East,West is BorderLayout and FlowLayout is LEFT/CENTER/RIGHT.
It can not be explained because it is written by development team in this Layout Manager
Francis Siu
Ranch Hand

Joined: Jan 04, 2003
Posts: 867
hi narasimha
I am grateful if you have any material about(JFC)or (Swing) related to MC in electronic version such as Front Page.
Could you send to me through email if you have.
thanks for your attention
Please reply,thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Alignment in Flowlayout:
 
Similar Threads
java.awt
Need suggestion reg Layout Managers
Layout problem with the gaps
Icefaces - PanelGrid align
Layout...