setModal in Java :     public DatePicker(JFrame parent) {
        d = new JDialog();
        d.setModal(true);
        String[] header = { "Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat" };
        JPanel p1 = new JPanel(new GridLayout(7, 7));
        p1.setPreferredSize(new Dimension(430, 120));

What is the purpose of  `d.setModal(true);` 
Have tried to search [Here](www.stackoverflow.com) with no convincing answer