provo a postare il codice che magari vi aiuta:
Codice PHP:
startProgram.addActionListener(
new ActionListener(){
public void actionPerformed ( ActionEvent e){
try {
pff = new ParserFromFile();
} catch (IOException e1) {e1.printStackTrace();}
prVector = pff.getPrVector();
for(int i=0; i<prVector.size(); i++){
boolean isPing = false;
String lnk;
lnk = sip + ((Pr) prVector.elementAt(i)).getPrId();
try {
visitor = new PrVisitor(lnk, (Pr) prVector.elementAt(i));
} catch (IOException e1) {e1.printStackTrace();}
((Pr) prVector.elementAt(i)).calc(look);
isPing = ((Pr) prVector.elementAt(i)).evaluate();
if(isPing){
outputString.append( ((Pr)prVector.elementAt(i)).getPrName()+" " );
outputString.append( ((Pr)prVector.elementAt(i)).getPrId()+ "\n" );
outputString.append( "i1:"+((Pr)prVector.elementAt(i)).getI1()+"\n" );
outputString.append( "i2:"+((Pr)prVector.elementAt(i)).getI2()+"\n" );
outputString.append( "i3:"+((Pr)prVector.elementAt(i)).getI3()+"\n" );
outputString.append( "i4:"+((Pr)prVector.elementAt(i)).getI4()+"\n\n" );
outputArea.setText(outputString.toString());
outputArea.setFont(fB);
}
}
}
}
);