Sorry, I have just review my little project and realize it is not I want to transfer data between JFrames.
It is like
Public Class JFrame2 Extends javax.swing.JFrame
{
public void tryingToDoSomething(int i)
{
/*Do something to call setSomething().*/
}
}
Public Class JFrame1 Extends javax.swing.JFrame
{
private int something;
public int setSomething(int something)
{
this.something = something;
}
private JFrame2 jFrame2 = new JFrame2();
public void runThings()
{
jFrame2.setVisible(true);
}
}
I have some content in the first JFrame, I call the second JFrame and with the second JFrame, I want to change the content of the first JFrame (like in my example, JFrame1 have "int something" and method "setSomething()", I called JFrame2 and use its method "tryingToDoSomething(int i)" to set the value of "int something" of JFrame1).
Still thank you very much for your answers.