Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- final JButton btnPotvrda = new JButton(MainFrame.getInstance().getResourceBundle().getString("btnPotvrda"));
- btnPotvrda.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- if(tfUser.getText().trim().length()==0 ||
- tfPass.getText().trim().length()==0){
- if(tfUser.getText().trim().length()==0)
- tfUser.setBackground(Color.RED);
- if(tfUser.getText().trim().length()==0)
- tfPass.setBackground(Color.RED);
- JOptionPane.showMessageDialog(null,MainFrame.getInstance().getResourceBundle().getString("Warning"));
- tfUser.setBackground(Color.WHITE);
- tfPass.setBackground(Color.WHITE);
- }
- }
- });
Add Comment
Please, Sign In to add comment