title: How to pop-up error in java swing to check whether the check-in date in hotel should be earlier than check-out date?
body: <p>I have following screenshot from jswing application. <a href="https://i.stack.imgur.com/JbPli.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JbPli.png" alt="JswingDate"></a></p>
  
  <p>Here, I have written as such to select date from the date picker -</p>
  
  <pre><code>//CheckIn Date
  JDateChooser dateChooser = new JDateChooser();
  dateChooser.setBounds(177, 136, 149, 22);
  frame.getContentPane().add(dateChooser);
  
  //CheckOut Date
  JDateChooser dateChooser_1 = new JDateChooser();
  dateChooser_1.setBounds(177, 136, 149, 22);
  frame.getContentPane().add(dateChooser_1);
  </code></pre>
  
  <p>Now, How to write the logic to select the Check In date earlier than Check Out date? If the Check In date is after Check Out date, an error should be popped up saying "check in date should be earlier than checkout date"</p>
  
  <p>I have used action listener but I am not able to replicate.</p>