Action performed here and the month is always executed with the else condition.
public void actionPerformed(ActionEvent e) {
tmonthin.setText((((JComboBox) e.getSource()).getSelectedItem()
.toString()) + " ");
Month = tmonthin.getText();
System.out.println(Month);
System.out.println("aby");
int n;
System.out.println(Month);
if (Month.equals("March") || "January".equals(Month)
|| "May".equals(Month) || Month == "July" || Month == "August"
|| Month == "October" || Month == "December") {
System.out.println("abd");
n = 31;
} else if (Month == "February") {
n = 28;
} else {
System.out.println("bnbn");
n = 30;
}
}