Updating JFrame.
Everyone,I am very new to java. I am trying to generate a report and put the report in the same frame as the input frame(where I gave the input for generating report.)Can I do it? And how?Regards,Minal
[243 byte] By [
M_Danga] at [2007-11-26 16:23:50]

Hi,
Yes you can do it. First create a JLabel with no values like:
JLabel jl = new JLabel("");
By using setBounds() set its position at the end part of the frame.
Now when you have generated your report, (most probably by clicking a button), in the action part give ,
jl.setText(report);
where report is the String variable representing the report you have generated.
If you report is too big to contain in a String, then use any other component in the same manner.
Best Regards,
Cochu.
[url= http://java.sun.com/j2se/1.5.0/docs/api/java/awt/CardLayout.html]CardLayout[/url]You can create all the different "screens" on different JPanels, then add them all to the CardLayout. Also; in the future, Swing questions should be posted in the Swing forum.