Miscellany
public text v1 · immutableint paj = 0;
String psn =txtNama.getText();
psn = psn.substring(0, 5);
JOptionPane.showMessageDialog(this, psn ,"Perhatian .....",JOptionPane.INFORMATION_MESSAGE);
paj = psn.length();
if(paj > 4){
JOptionPane.showMessageDialog(this, paj ,"Perhatian .....",JOptionPane.INFORMATION_MESSAGE);
}