C
carmelo
Hi everybody,
I'm developing a Swing app with a main Frame which contains multiple
JInternalFrames.
I need to make something like this:
We have 2 JInternalFrame: intf1 and intf2.
intf1 contains some JTextFields and some JButtons.
intf2 contains a JTable.
On intf1, when button Button2 is clicked, intf2 must open. On intf2
there are some values on a JTable, which should be passed to the
calling JInternalFrame (in this case intf1) writing them on its
JTextField.
Regarding the intf2 opening on Button2 click, I was able to do that
accessing the main Frame (let's call it frmMain) in this way:
if (frmMain.intf2 == null) {
frmMain.intf2 = new JInternalFrame("Internal Frame
2",true,true,true,true);
frmMain.intf2.setContentPane(new IntFrame2());
frmMain.intf2.setBounds(12, 9, 500, 400);
frmMain.jDesktopPane1.add(frmMain. intf2);
frmMain.jDesktopPane1.updateUI();
}
frmMain.intf2.show();
What do you think about it?
Regarding the access to the calling JTextField I don't know...
How can I do? I hope you can help me
Thank you very much in advance!
I'm developing a Swing app with a main Frame which contains multiple
JInternalFrames.
I need to make something like this:
We have 2 JInternalFrame: intf1 and intf2.
intf1 contains some JTextFields and some JButtons.
intf2 contains a JTable.
On intf1, when button Button2 is clicked, intf2 must open. On intf2
there are some values on a JTable, which should be passed to the
calling JInternalFrame (in this case intf1) writing them on its
JTextField.
Regarding the intf2 opening on Button2 click, I was able to do that
accessing the main Frame (let's call it frmMain) in this way:
if (frmMain.intf2 == null) {
frmMain.intf2 = new JInternalFrame("Internal Frame
2",true,true,true,true);
frmMain.intf2.setContentPane(new IntFrame2());
frmMain.intf2.setBounds(12, 9, 500, 400);
frmMain.jDesktopPane1.add(frmMain. intf2);
frmMain.jDesktopPane1.updateUI();
}
frmMain.intf2.show();
What do you think about it?
Regarding the access to the calling JTextField I don't know...
How can I do? I hope you can help me
Thank you very much in advance!