Interface becomes blank during external processing
Submitted by Thursday, 17 April, 2008 - 10:27
on
In my below contents, please substitue '[' and ']' with 'open angle bracket' and 'close angle bracket' respectively.
Contents of my jedit_gui.props is as follows
#{{{ process menu
process=aaa \
bbb \
ccc \
ddd \
Contents of my actions.xml is as follows
[ACTION NAME="aaa"]
[CODE]
view.selectProcess("aaa",buffer);
[/CODE]
[/ACTION]
[ACTION NAME="bbb"]
[CODE]
view.selectProcess("bbb",buffer);
[/CODE]
[/ACTION]
[ACTION NAME="ccc"]
[CODE]
view.selectProcess("ccc",buffer);
[/CODE]
[/ACTION]
[ACTION NAME="ddd"]
[CODE]
view.selectProcess("ddd",buffer);
[/CODE]
[/ACTION]
Contents of my View.java is as follows
public void selectProcess(String action,final Buffer buffer) throws IOException
{
...
}
From my customized jedit.jar, when I select anyone of the 4 menubar options (i.e., either aaa, bbb, ccc or ddd), its respective external process happens. But during the happening of the process, the jedit userinterface becomes blank. And till the external process for the respective menubar option is completed I cannot do anyother process on the jedit userinterface.
I think to solve this problem, I need to use Multithreading. Could anyone please tell me where and how do I use Multithreading concept in my above program.
Contents of my jedit_gui.props is as follows
#{{{ process menu
process=aaa \
bbb \
ccc \
ddd \
Contents of my actions.xml is as follows
[ACTION NAME="aaa"]
[CODE]
view.selectProcess("aaa",buffer);
[/CODE]
[/ACTION]
[ACTION NAME="bbb"]
[CODE]
view.selectProcess("bbb",buffer);
[/CODE]
[/ACTION]
[ACTION NAME="ccc"]
[CODE]
view.selectProcess("ccc",buffer);
[/CODE]
[/ACTION]
[ACTION NAME="ddd"]
[CODE]
view.selectProcess("ddd",buffer);
[/CODE]
[/ACTION]
Contents of my View.java is as follows
public void selectProcess(String action,final Buffer buffer) throws IOException
{
...
}
From my customized jedit.jar, when I select anyone of the 4 menubar options (i.e., either aaa, bbb, ccc or ddd), its respective external process happens. But during the happening of the process, the jedit userinterface becomes blank. And till the external process for the respective menubar option is completed I cannot do anyother process on the jedit userinterface.
I think to solve this problem, I need to use Multithreading. Could anyone please tell me where and how do I use Multithreading concept in my above program.