Okay I'm Using JDesktop Pane To create and bring up 3 different frames. Now I want to be able to Enter Data into one frame and then It show Up in another frame.
I've tried Embedding Actionlisteners but this has not worked
I've tried setting the objects to public this hasn't worked
Basically I have the first frame a input frame
The second frame a Table
I want to input the data from the input frame into the second frame which is a table
If you have any idea how to do this, can you should me some code, or please try and explain it to me? Thanks for the help
The easiest way would be to supply all your internal frames with a constructor that
took the main frame as a poniter. So, when you fill in data in one frame and want
to 'send' this to another internal frame, the internal frame would call the mainframe
requesting the pointer to the other one and use that for invoking the receival
method of the other frame.
Or, as I've shown earlier in this forum, you could have an arraylist in the mainframe
that your store the pointers to all the internal frames in. If you include this arraylist
as one of the internal frames constructor's parameters, then the internalframes can
scan this arraylist to find the other internal frames that they need to 'communicate' with.
"The easiest way would be to supply all your internal frames with a constructor that took the main frame as a poniter. So, when you fill in data in one frame and want to 'send' this to another internal frame, the internal frame would call the mainframe requesting the pointer to the other one and use that for invoking the receival method of the other frame."
when I take the Main Frame as a pointer as You say, Would I be referencing Jframe or MyDesktopPane
public JInternalFrame createFrame1(myDesktop m, String t) {
So would a JInternframe be like this? up Above?
and Then How would I be able to point the pointer to the text boxes and then have them equal what's in the textboxes?
...where TabInternalFrame is another internal frame that exists in the application,
on the desktop. This implies that the mainFrame must store the pointers
to the internal frames that are created.
In my example above the mainframe hands the pointer to another frame on
the desktop to this internalframe, and so it can access the other internal
frames' textboxes of whatevver, as long as the properties/components are
made public, either through direct access of via setters and getters.
Okay I've got everything working except there are major errors with my scroll pane. everytime I implement table.setvisible to true on line 258 it doesn' t work gives me a lot of errors I dont' quite understand, ANy Input?
Bookmarks