code: @SuppressWarnings("deprecation")
      private void refreshDayBtns() {
  
          remove(daysPanel);
  
          daysPanel = new JPanel();
  
          daysPanel.removeAll();
          daysPanel.setLayout(new GridLayout(0, 7));
  
          int displayYear = getDisplayYear();
          int displayMonth = getDisplayMonth();
          String[] days = getDays(displayYear, displayMonth - 1);
  
          addDayHeadLabels();
  
          Date d = picker.getDate();
  
          Calendar cal = Calendar.getInstance();
          cal.setTime(d);
          int currentYear = cal.get(Calendar.YEAR);
  
          int currentMonth = cal.get(Calendar.MONTH);
          int currentDay = cal.get(Calendar.DAY_OF_MONTH);
          /*
           * Add days label before 1st
           */
          for (Date it : getBeforeDays(displayYear, displayMonth - 1)) {
              JLabel label = new JLabel(String.valueOf(it.getDate()));
              label.setVerticalAlignment(JLabel.CENTER);
              label.setHorizontalAlignment(JLabel.CENTER);
              label.setEnabled(false);
              daysPanel.add(label);
          }
  
          for (String it : days) {
              DayBtn btn = new DayBtn(it);
              if (displayYear == currentYear && displayMonth == currentMonth + 1 && currentDay == Integer.parseInt(it)) {
                  btn.setBackground(Color.GRAY);
                  btn.clicked = true;
              }
  
              dayBtns.add(btn);
              daysPanel.add(btn);
          }
  
          /*
           * Add days label after last day
           */
          for (Date it : getAfterDays(displayYear, displayMonth - 1)) {
              JLabel label = new JLabel(String.valueOf(it.getDate()));
              label.setVerticalAlignment(JLabel.CENTER);
              label.setHorizontalAlignment(JLabel.CENTER);
              daysPanel.add(label);
              label.setEnabled(false);
          }
  
          add(daysPanel);
  
          /*
           * Update ui
           */
          updateUI();
          if (picker.getPopup() != null) {
              Method method;
              try {
                  method = Popup.class.getDeclaredMethod("pack");
                  method.setAccessible(true);
                  method.invoke(picker.getPopup());
              } catch (Exception e) {
              }
          }
      }
docs: Refresh day btn tables