Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 918
  • Last Modified:

Maximize JDesktopPane


How can I Maximize JDesktopPane.

Thank you
0
sree032397
Asked:
sree032397
1 Solution
 
StillUnAwareCommented:
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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now