public void actionPerformed(ActionEvent e) {
String nSequences = dna.getText();
int len = nSequences.length();
if(len % 3 != 0)
return;
protein.setText(ProteinFinder.find(nSequences) + " ");
}
to
public void actionPerformed(ActionEvent e) {
String nSequences = dna.getText();
int len = nSequences.length();
if(len != 0) // <-----------------------
dna.setText(nSequences.toUpperCase()); // <-----------------------
if(len % 3 != 0)
return;
protein.setText(ProteinFinder.find(nSequences) + " ");
}

New Topic/Question
Reply




MultiQuote




|