Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jDesktopPane fill in JFrame1

 
Amarjeet Anand
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi...
m new in java application development. I m developing a java desktop application. in a MDI JFrame, i have added a jDesktopPane. i made the MDI JFrame to open as window maximized both state. now i want that the JDesktopPane should also proportionally get expended to hold the child jFrames....


So how could i fill the desktop pane in the jFrame.???

also tell me if i can fill the JDesktopPane in any particular Panel(placed over the MDI Frame).

please please please ... tell me the codes or refer to a link so that i could get it ....

thanks for any reply...
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You set the JDesktopPane as the JFrame's contentPane().

And you use JInternalFrame for the internal documents, not JFrames.
 
Amarjeet Anand
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you a lot steve ....

but i am so ashamed to again ask you a silly question is that ....how to "set the JDesktopPane as the JFrame's contentPane(). "

let my main mdi frame is frmMDI ... having a JDesktopPane1......

i know that asking this question is so silly .... but please,,,,, reply me.... i will be waiting for your kind response.
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are asking for me to post code so you can copy and paste it, then that isn't going to happen. You can either show me what you have tried that didn't work, explain the troubles you are having with setting the content pane or read up on how to use Swing (such as from the official Swing tutorial here: http://docs.oracle.com/javase/tutorial/uiswing/index.html).

In other words: I would much rather you learn how to write this code than spoon feed it to you. It might take longer but you will profit from it in the long run.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic