Java & Netbeans: Display JInternalFrameForm inside the jDesktopPane

The code is use to display jInterFrameForm inside the jDesktop Pane.

Form1 frm = new Form1();
Dimension desktopSize = jDesktopPane1.getSize();
Dimension jInternalFrameSize = frm.getSize();
re.setLocation((desktopSize.width - jInternalFrameSize.width)/2, (desktopSize.height- jInternalFrameSize.height)/2);
jDesktopPane1.add(frm);
frm.show();

 

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz