将帧添加到mainFrame

将帧添加到mainFrame

本文介绍了将帧添加到mainFrame的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的主框架中添加一些框架,让我们说我想要3帧(Frame1,Frame2和Frame3):

i want to add some frame to my main frame, lets say we've 3 frames (Frame1, Frame2, and Frame3) i want to:


  1. 创建新的框架,称为第4帧并添加带有项目的菜单栏(View Frame1,View Frame2,View Frame3) - >实际上我创建了这个框架成功。

  2. 当点击View Frame1时,我想在Frame4的某个地方显示Frame1,依此类推所有menuItems

  3. 我的问题是我通过使用拖放技术创建了我的旧框架。在net beans中

  4. 有一个名为internalFrame的组件,但是当我尝试使用它时,我无法将旧框架添加到此内部框架中。

  1. Create new Frame called Frame 4 and add menu bar with items (View Frame1, View Frame2, View Frame3) --> actually i've created this frame successfully.
  2. When click on View Frame1 i want to display Frame1 in a certain place in Frame4 and so on for all menuItems
  3. My problem is i've created my old frames by using Drag-and-drop tech. in net beans
  4. There is a component called internalFrame but when i tried to use it i couldn't add my old frame to this internal one.


推荐答案

您可以通过阅读,使用NetBeans在Java中创建MDI应用程序。

You can solve your problems by reading this great tutorial on creating MDI applications in Java using NetBeans.

这篇关于将帧添加到mainFrame的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 01:00