我的问题是,我不知道如何将值从jInternalFrame传递到另一个值。当我在jInternalFrame1上时,我点击一个打开jInternalFrame2的按钮,在这个按钮中我需要放一些值(string和int),当我单击jInternalFrame2中的"OK“按钮时,我想在jInternalFrame1中显示这些值。下面是我如何在我的jInternalFrame2上打开jInternalFrame1:
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
ConfigureHost ch = new ConfigureHost(); //ConfigureHost is my jInternalFrame2
jDesktopPane1.add(ch); //Yeah I have a DesktopPane on my jInternalFrame1
ch.setVisible(true);有人有什么想法吗?
发布于 2013-10-22 10:22:45
在内部框架中有一个构造函数,并在创建该框架对象时传递相关值。
https://stackoverflow.com/questions/19514996
复制相似问题