how to set the size and position of JFrame

hey all,i have a frame and i devide the frame into three panels, i want to make the top panel the lergest and make it square. and the rest two panels in small and in the bottom of the frame.could you please help me to set the size and position of the jpanelThanks
[291 byte] By [gargoorya] at [2007-11-26 19:49:15]
# 1

If u want the bottom 2 panels to be on the same level, u can try setting ur content pane to use the BorderLayout and the adding the 3 panels to it with BorderLayout.NORTH(for the TOP panel), BorderLayout.EAST(RIGHT panel) and BorderLayout.WEST(for LEFT panel).

Don't know if this is what ur looking for, maybe u could describe more on ur layout with a sample image or something?

Z.Ka at 2007-7-9 22:37:36 > top of Java-index,Desktop,Core GUI APIs...
# 2
thanks for helping i tried this method but there is no changeand if there is any method to change the size of the panel
gargoorya at 2007-7-9 22:37:36 > top of Java-index,Desktop,Core GUI APIs...
# 3

By default a panel is the preferred size of all the children added to the panel. If you want to override this then you need to use setPreferredSize() on the panel.

Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/layout/visual.html]How to Use Layout Managers[/url] for more information.

camickra at 2007-7-9 22:37:36 > top of Java-index,Desktop,Core GUI APIs...
# 4
if you can paint it (either with ASCII or in a paint application and uploading it on the web somewhere), then I can show a code of how it's done :)
alienchilda at 2007-7-9 22:37:36 > top of Java-index,Desktop,Core GUI APIs...