swingxä½ å¯ä»¥å°mavenåºéé¢æç´¢Jarå
ï¼google "maven repos"ï¼åºç°å¾å¤mavenåºï¼é便æ¾ä¸ä¸ªï¼æç´¢swingxï¼æ¾ææ°çä¸è½½ãå¦æä½ ä½¿ç¨maven管ç项ç®ï¼é£æ´å¥½åäºï¼æswingxæ¾å
¥ä¾èµéé¢å³å¯ï¼ã
JXDatepickerç使ç¨æ¹æ³ï¼
// JXDatePickeræä¾äºç¼è¾å¨ä¾ç¨æ·ç´æ¥è¾å
¥æ¥æï¼ä¹æä¾äºå³ä¾§æé®ï¼ç¹å»æé®åºç°æ¥æéæ©æä¾ç¨æ·éæ©æ¥æã
JXDatePicker datePicker = new JXDatePicker();
JXDatePicker datePicker1 = new JXDatePicker(new java.util.Date());
java.util.Date date = datePicker.getDate(); // ç¨æ·è¾å
¥æéæ©æ¥æåå¾å°æ¥æå¼
java.util.Date date1 = datePicker1.getDate(); // ç¨æ·è¾å
¥æéæ©æ¥æåå¾å°æ¥æå¼
//å½ç¶ï¼ä½ ä¹å¯ä»¥æå®ç¨æ·è¾å
¥æ¥æçæ ¼å¼ã
JXDatePicker datePicker2 = new JXDatePicker();
datePicker2.setFormats("yyyy.M.d", "yyyy-M-d");//å¯åæ¶è®¾ç½®å¤ç§æ ¼å¼ãsetFormats(String...format)
JXMonthViewç使ç¨æ¹æ³ï¼
JXMonthView monthView = new JXMonthView();
monthView.setUnselectableDates(new java.util.Date());// 设置å¤ä¸ªä¸å¯éæ©çæ¥æï¼setUnselectableDates(java.util.Date ... date)
Set<java.util.Date> unselectable = monthView.getSelectionModel().getUnselectableDates();// è·å¾å½åæåªäºä¸å¯éæ©æ¥æ
monthView.setFlaggedDates(date1,date2)// 设置å¤ä¸ªè¢«æ è®°äºçæ¥æ
Set<java.util.Date> flaggedDates = monthView.getFlaggedDates();// è·å¾è¢«æ è®°çæ¥æ
Calendar calendar = monthView.getCalendar();// è·å¾æ¥å对象
è¿æä¸äºå¯set,getçå±æ§ç½åå¦ä¸ï¼
selectionMode
traversable
firstDayOfWeek
è¿ææ´å¤ç¨æ³ï¼çAPIå§ãå¦æ使ç¨Mavenï¼ä½ å¯ä»¥èªå¨ä¸è½½javadocåjavasourceã
温馨提示:答案为网友推荐,仅供参考