Display Internal Frame Form into Desktop Pane in Java

0
33

This tutorial entitled “Display Internal Frame Form into Desktop Pane in Java” will teach you on how to display or open the jInternalFrameForm into jDesktopPane elements in Java. This features is always use in Main Data Interface or MDI of a program.

What is Main Data Interface (MDI)? The Main Data Interface is a first form loads when the program is running; others called it as main form because it links other forms. Please follow all the steps below to complete this tutorial.

Display Internal Frame Form into Desktop Pane in Java Steps

  1. Create or Insert a new Form inside your Netbeans source package.

2. Design your form just like the image below. The form uses the jMenubar and jDesktopPane element located in your tool palette.

3. Create or Insert a new Internal Frame form inside your Netbeans source package.

4. Design your form just look like the image below.

5. In your from created in step 1, right click the File menu > Add from Palette > Menu Item to add a new menu item. Rename your menu item; in my case I rename my menu item to “JInternal Frame Form”.

6. Double click your new create menu item to generate the action perform event private method.

  1. private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {
  2.  
  3. }

7. Insert the codes below inside your new created action perform event private method.

  1. file d = new file();
  2. jDesktopPane1.add(d);
  3. d.show();

8. Run your program and the output should look like the image below.

After completing this tutorial, you learned and understand on how to display the internal frame form into desktop pane to create an MDI. It is important to a program to have a Main data interface (MDI) so that you can link all your forms with in your MDI. You can also design your MDI by adding colors and icons so that it is presentable.

If you have question and suggestion about Display Internal Frame Form into Desktop Pane, feel free to use our contact information.

 

Facebook Comments
(Visited 43 times, 1 visits today)

LEAVE A REPLY

Please enter your comment!
Please enter your name here