Code with Finding: |
class BACPanel.MRZPanel {
public MRZPanel() {
super(new BorderLayout());
setBorder(BorderFactory.createTitledBorder(PANEL_BORDER, "MRZ"));
JPanel top = new JPanel(new FlowLayout());
docNrTF = new JTextField(9);
dateOfBirthTF = new JTextField(6);
dateOfExpiryTF = new JTextField(6);
docNrTF.setText(PassportGUI.DEFAULT_DOC_NR);
dateOfBirthTF.setText(PassportGUI.DEFAULT_DATE_OF_BIRTH);
dateOfExpiryTF.setText(PassportGUI.DEFAULT_DATE_OF_EXPIRY);
kEncTF = new HexField(24);
kEncTF.setEditable(false);
kMacTF = new HexField(24);
kMacTF.setEditable(false);
top.add(new JLabel("Document number: "));
top.add(docNrTF);
top.add(new JLabel("Date of birth: "));
top.add(dateOfBirthTF);
top.add(new JLabel("Date of expiry: "));
top.add(dateOfExpiryTF);
JButton updateButton = new JButton("Derive Keys");
top.add(updateButton);
updateButton.addActionListener(this);
JPanel center = new JPanel(new FlowLayout());
JPanel bottom = new JPanel(new GridLayout(2, 2));
bottom.add(new JLabel("K.ENC: ", JLabel.RIGHT));
bottom.add(kEncTF);
bottom.add(new JLabel("K.MAC: ", JLabel.RIGHT));
bottom.add(kMacTF);
add(top, BorderLayout.NORTH);
add(center, BorderLayout.CENTER);
add(bottom, BorderLayout.SOUTH);
}
}
|