1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| public class TestPanel extends JPanel{
/**
*
*/
private ResultList list;
public TestPanel(){
int number = 2;
new SwingWorker<ResultList, Boolean>() {
@Override
protected ResultList doInBackground() throws Exception {
ResultList list = experiences (number);
return list;
}
@Override
protected void done() {
// TODO Auto-generated method stub
try {
list = get();
} catch (Exception ignore) {
}
super.done();
}
}.execute();
// System.out.println(list.list1.get(0));
} |
Partager