How to set first day of week in a Java application calendar

Viewed 32091

We use a java application, it has a date selection field, when you click there a small calendar opens. First day of the week is Sunday there. But I want it to be Monday. I try to change it from Windows Control Panel from Date settings. I set Windows calendar's first day to Thursday, for instance. But in Java application's calendar, first day of the week is still Sunday. Is it possible to change the Java application's first day of the week from Windows, or is it only changed from Java application's code?

Regards

4 Answers

If you want to set Monday then use

Calendar currentCalendar = Calendar.getInstance(new Locale("en","UK"));

If you want to set Sunday then use

Calendar currentCalendar = Calendar.getInstance(new Locale("en","US"));
Related