- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我接到了创建 JInternalFrame
的任务它可以调用我的小程序工作的多个(最后一个任务调用 SpherePainter
)并且可以计算在 JinternalFrame
中运行了多少个“小程序”。 .
[小程序在另一个内部运行JInternalFrame
]
public class MyInternalFrame extends JInternalFrame {
static int openFrameCount = 0;
static final int xOffset = 30, yOffset = 30;
public MyInternalFrame() {
super("SpherePainter #" + (++openFrameCount),
true,
true,
true,
true);
setSize(500,500);
//Set the window's location.
setLocation(xOffset*openFrameCount, yOffset*openFrameCount);
SpherePainterApplet sp = new SpherePainterApplet ();
sp.init();
this.add(sp);
}
checkApp++
创建一个小程序时,
checkApp--
当一个关闭。
最佳答案
"Is there a way to use listener of closing button (X) or similar????"
InternalFrameListener
正如奥列格在评论中指出的那样。您可以在
How to write InternalFrameListeners 看到更多信息
public class IFrame extends JInternalFrame {
public IFrame() {
addInternalFrameListener(new InternalFrameAdapter(){
public void internalFrameClosing(InternalFrameEvent e) {
// do something
}
});
}
}
"I got a assignment to create a JInternalFrame that can call mutiple of my applet work"
关于java - 在 JInternalFrame 中单击关闭 (X) 按钮时如何执行某些操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22045710/
任何人都可以帮助如何将值从一个 jInternalFrame1 传递到另一个 jInternalFrame2?我无法在 jInternalFrame2 中创建 jInternalFrame1 的对
我有 2 个 JInternalFrames,每个 JInternalFrames 包含一个 JPanel。一个 JPanel(源)更新其 GUI 和一些数据以响应鼠标事件。另一个 JPanel(目标
有可能吗?从另一个 JInternalFrame 调用 JInternalFrame ??如果是这样怎么办? 我花了好几个小时寻找答案..之前发现一些问题.. 在这里How to manage a J
我有一个包含这段代码的 JDesktopPane。 public class Menu extends JFrame implements ActionListener{ /** * Creates
这是我的源代码。我无法将我的 JInternalframe 放到前面。我已经尝试了很多代码,但没有任何效果。 private void jMenuItem3ActionPerformed(ja
在下面的 SSCCE 中,您可以看到,如果最大化 JInternalFrame 之一,则会同时最大化它们。这只(AFAIK)发生在“Windows”LookAndFeel 中(如果省略 LookAnd
我在桌面 Pane 内有一个 JInternalframe (tab_items)。每当用户单击 tab_items 中的弹出菜单时,我想在同一桌面 Pane 中打开另一个 JInternalfram
例如: 当JButton1点击JInternalFrame1时在JDesktopPane上显示当JButton2点击JInternalFrame1关闭时,JInternalFrame2在JDeskto
我正在创建一个非常简单的程序。我创建了这个类:MainJframeClass、JDesktopPaneClass、JinternalFrameClass1 和 JinternalFrameClass2
在我的应用程序中,我尝试在实现 MigLayout 的单个 JDesktopPane 中打开一个 JInternalFrame 覆盖另一个 JInternalFrame > 但它在第一个内部框架旁边显
我已经阅读了很多关于 Java 中的构造函数的文章,并在 stackoverflow 中搜索了相关问题,但我仍然对我的程序如何从 jinternalframe1 到 jinternalframe2 获
我使用 netbeans 在 java 中创建了 MDI(多文档界面),其中我有两个 jbuttons 和一个 jdesktoppane 所以当点击两个按钮然后两个 jinternalframes 在
我从 https://stackoverflow.com/a/6868039/2240900 得到的这段代码 how to add the internal2 to desktoppane1 usin
您好,我需要一个示例程序,其中当我最大化 JInternalFrame 时,JFrame 的 JMenuBar 应该设置在 JInternalFrame 上当我再次最小化 JInternalFrame
我创建了一个应用程序,其中有两个标题为 的选项卡选项卡 Pane 1 和 选项卡 Pane 2 .在一个标签正文中 选项卡 Pane 1 包含 JInternalFrame其中有一个搜索按钮。单击按钮
我想在 jFrame 中的桌面 Pane 上显示 jInternalFrame1。jInternalFrame1 包含一个按钮,用于通过删除 jInternalFrame1 在桌面 Pane 上显示
我在网上看到一个JInternalFrame的例子,它是这样写的: public class AddEntry extends JInternalFrame 当我尝试在 Netbeans 中创建 JI
下面的“代码部分 1”用于在 MDI 应用程序中从 menuItem 调用 UcakListesi(JinternalFrame) 没有问题。 我想使用相同的代码从另一个 JinternalFrame
我打算在全屏模式下使用 JInternalFrame 作为模态 JDialog,但是,当它被调用时当前没有显示。我需要将它添加到某个容器中吗?我尝试将它添加到 JOptionPane.showInte
我正在处理与此错误相关的问题,我认为:DefaultDesktopManager does not handle InternalFrame state changes as expected. 我有
我是一名优秀的程序员,十分优秀!