Hi I am using JFrame to design swing application on clicking a menu in JFrame my requirement is to add JInternal frame on the JFrame and its working . Now the problem is that i want to refresh the Jframe according to the button clicked on jinternalframe and close the current JInternal Frame. How is it possible
on button click of the JInternal frame i am using the following code
try
{
MainForm frm= new Mainform();
frm.cp.add("adding here JEditor Pane");
this..dispose();
}
catch(Exception ex)
{
}
its working and also closing the JinternalFrame but the page of JFrame form is opened in new window not refreshing the previous one
can you suggest me the code plz
thanks a lot in advance
part of your question are explained in the Oracle tutorial How to Use Internal Frames
rest is described in the
Rules of Using Internal Framesread How to Use Buttons and How to Write an Action Listener
in the case that you’ll a real question, the post an SSCCE demonstraded your issue(s) with
JButton,ActionListenerandJInternalFramesI’d be reuse
JInternalFramesand change only their visibily on the screen