public void actionPerformed (ActionEvent event)
{
Object source = event.getSource(); //Bottone CALCOLA
if(source == b){
s1 = text.getText();
s2 = text2.getText();
if(s1.equals("") || s2.equals("")){
JOptionPane.showMessageDialog(null,"Devi inserire entrambe le stringhe!");}
else{
LCS lcs1 = new LCS(s1,s2);
int mat[][]=new int[s1.length()][s2.length()];
mat=lcs1.AlgoritmoLCS(s1,s2);
text3.setText(Integer.toString(mat[s1.length()][s2.length()]));
text4.setText(lcs1.stampaLCS(s1,s2));
}
}
else if(source == c) //Bottone ESCI
{
System.exit(0);
}
else if(source == d) //Bottone MATRICE
{
s1 = text.getText();
s2 = text2.getText();
if (s1.length()==0 || s2.length()==0){
JOptionPane.showMessageDialog(null,"Impossibile creare la matrice!");
}
else{
a questo punto vorrei creare una tabella dove visualizzare la matrice S[i][j] creata