I am new to Swing.
I am creating a MDI Application. In my application am using menus. On menus select option
i want to call that selected panel.
the panel code is written in another file...
The code is working fine if I am writing the Whole code in one file..
But if i create another class and write panel code in that class.
and when i create object of that class in main class. Its not displaying the panle code in
the panle is being displayed out of frame..
seems to work the same way to me, either way - all as a single .java file, or as separate .java files
all in ReportPanel() is added to a separate JFrame, so it would be correct to appear 'outside' of the initial JDesktopPane/JFrame
perhaps what you need to do is pass a reference of the first JDesktopPane 'desk' when you create ReportPanel(...),
then add reportpanel's JInternalFrame to 'desk', rather than to a newly created JDesktopPane/JFrame