Maximize JDesktopPane


How can I Maximize JDesktopPane.

Thank you
LVL 1
sree032397Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
StillUnAwareConnect With a Mentor Commented:
You must set the correct container Layout. For example, if using JFrame, the default layout is BorderLayout, and if using JPanel, the default is FlowLayout, instead You can set it to BorderLayout too:

jPanel.setLayout(new BorderLayout());
jPanel.add(jDesktopPane);

see the docs on layouts:

http://java.sun.com/docs/books/tutorial/uiswing/layout/using.html

and BorderLayout
http://java.sun.com/docs/books/tutorial/uiswing/layout/border.html
http://java.sun.com/j2se/1.5.0/docs/api/java/awt/BorderLayout.html
0
All Courses

From novice to tech pro — start learning today.