I am writing an event for button.In that ,i have used swingworker in the way that i use execute method in this button code.Everything works fine but the problem is that i want to display a panel just after the execute method is finished.What is happening is that panel appears before the execute method finishes its task.Here is my code.Kindly help me howto display the panel once the execute method is finished with its task
Main f2=new Main();
f2.getfile(FileName,0);
f2.execute();
Panel.setVisible(true);
Panel.setSize(815, 587);
edited: Well i have found a solution, for this if anyone faces the same problem.I have created a method(call it showPanel) in GUI class and when the SwingWorker done method is called then in that done method i call the showPanel method for showing the panel.