Skip to content

Commit Listener #2

@tdbear

Description

@tdbear

When a user select a date in a DatePicker, the commit event who is fired only to itself.
I think it must call all registered commit listeners from DatePicker.

For example:
This code is supposed to show I have been changed in the console when you select a date, but it doesn't.

public static void main(String[] args) {
   JFrame frame = new JFrame();
   frame.setBounds(100, 100, 450, 300);
   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   DatePicker myDP = new DatePicker();
   frame.getContentPane().add(myDP);
   myDP.addCommitListener(new CommitListener() {

    @Override
    public void commit(CommitEvent event) {
        System.out.println("I have been changed!");
    }
   });
   frame.setVisible(true);
}

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions