I have JPanel
, from which I am opening a search criteria Dialog that extends AbstractAIFDialog
. It consists of search criteria text field, result table view and search button. After clicking Search, in this dialog, I need to show progress bar till I get the result from database.
I am calling the below function when Search button is clicked:
SearchResult res = SearchExecuteHelperUtils.execute(searchService, 0);
The above execute function definition is as below:
public static SearchResult execute(SearchProvider searchService, int nLoadAll)
throws Exception
{
final Display display = PlatformUI.getWorkbench().getDisplay();
if(display != null)
display.syncExec(new Runnable() {
public void run()
{
try
{
(new ProgressMonitorDialog(display.getActiveShell())).run(true, true, executeSearch);
}
catch(InvocationTargetException e)
{
e.printStackTrace();
}
catch(InterruptedException e)
{
e.printStackTrace();
}
}
The problem is that I have the JPanel
open. On top of it I have the Search criteria
dialog. On click of Search
button, progress bar appears, but after progress bar closes, results are populated in the Searc开发者_开发知识库h
dialog but the dialog goes behind the JPanel
.
What should I do?
..I have the
JPanel
open. On top of it I have theSearch criteria
dialog. On click ofSearch
button, progress bar appears, but after progress bar closes, results are populated in theSearch
dialog but the dialog goes behind theJPanel
.
It seems as though the JPanel
should be the component passed to a JOptionPane
that shows the progress bar/search results.
精彩评论