JXDatePicker Tage färben

Status
Nicht offen für weitere Antworten.
G

Gast2

Gast
Servus,

Weiß jemand ob es die Möglichkeit gibt bei ein einem JXDatePicker bestimmte Tage selber einzufärben?
 
G

Gast2

Gast
Falls jemand das gleiche Problem hat... hier hat mein 2 Modien um Dates zu makieren Farbe lässt sich auch ändern
Java:
monthView.setFlaggedDates()
monthView.getSelectionModel().setUnselectableDates(dates);

Edit: JXMonthView: JDNC Calendar Component
 
Zuletzt bearbeitet von einem Moderator:
G

Gast2

Gast
Vielleicht kennt sich doch jemand besser damit aus ...
Java:
SortedSet<Date> unselectedDates = new TreeSet<Date>();
//add datum

...


datePicker.getMonthView().setUnselectableDates(unselectedDates.toArray(new Date[1]));

gibt eine häßliche exception =(...
Code:
Exception occurred during event dispatching:
java.util.ConcurrentModificationException
	at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1031)
	at java.util.TreeMap$KeyIterator.next(TreeMap.java:1058)
	at org.jdesktop.swingx.calendar.DaySelectionModel.setUnselectableDates(DaySelectionModel.java:239)
	at org.jdesktop.swingx.JXMonthView.setUnselectableDates(JXMonthView.java:1009)
	at de.dig.pp.cli.swing.tools.JDatePicker.updateMonth(JDatePicker.java:238)
	at de.dig.pp.cli.swing.tools.JDatePicker.propertyChange(JDatePicker.java:198)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
	at java.awt.Component.firePropertyChange(Component.java:7192)
	at org.jdesktop.swingx.JXMonthView.setFirstDisplayedDay(JXMonthView.java:613)
	at org.jdesktop.swingx.JXMonthView.ensureDateVisible(JXMonthView.java:631)
	at org.jdesktop.swingx.plaf.basic.BasicDatePickerUI.updateFromDateChanged(BasicDatePickerUI.java:659)
	at org.jdesktop.swingx.plaf.basic.BasicDatePickerUI$Handler.datePickerPropertyChange(BasicDatePickerUI.java:1248)
	at org.jdesktop.swingx.plaf.basic.BasicDatePickerUI$Handler.propertyChange(BasicDatePickerUI.java:1208)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
	at java.awt.Component.firePropertyChange(Component.java:7192)
	at org.jdesktop.swingx.JXDatePicker.setDate(JXDatePicker.java:330)
	at org.jdesktop.swingx.plaf.basic.BasicDatePickerUI.updateFromValueChanged(BasicDatePickerUI.java:680)
	at org.jdesktop.swingx.plaf.basic.BasicDatePickerUI$Handler.editorPropertyChange(BasicDatePickerUI.java:1234)
	at org.jdesktop.swingx.plaf.basic.BasicDatePickerUI$Handler.propertyChange(BasicDatePickerUI.java:1211)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
	at java.awt.Component.firePropertyChange(Component.java:7192)
	at javax.swing.JFormattedTextField.setValue(JFormattedTextField.java:777)
	at javax.swing.JFormattedTextField.commitEdit(JFormattedTextField.java:508)
	at javax.swing.JFormattedTextField$CommitAction.actionPerformed(JFormattedTextField.java:1092)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1571)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2772)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2807)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2735)
	at java.awt.Component.processEvent(Component.java:5294)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3984)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1826)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:681)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:938)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:810)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:645)
	at java.awt.Component.dispatchEventImpl(Component.java:3857)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Window.dispatchEventImpl(Window.java:1791)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
	at java.awt.Dialog$1.run(Dialog.java:535)
	at java.awt.Dialog$2.run(Dialog.java:565)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.Dialog.show(Dialog.java:563)
	at java.awt.Component.show(Component.java:1302)
	at java.awt.Component.setVisible(Component.java:1255)
	at de.dig.pp.cli.swing.JProductPlanner.openDatePicker(JProductPlanner.java:1105)
	at de.dig.pp.cli.swing.action.OpenAction.actionPerformed(OpenAction.java:21)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
	at java.awt.Component.processMouseEvent(Component.java:5517)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
	at java.awt.Component.processEvent(Component.java:5282)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3984)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1791)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
 
Zuletzt bearbeitet von einem Moderator:
Status
Nicht offen für weitere Antworten.
Ähnliche Java Themen
  Titel Forum Antworten Datum
G Lizenz JXDatePicker AWT, Swing, JavaFX & SWT 13
A JXDatePicker auf "" setzen AWT, Swing, JavaFX & SWT 3
G JXDatePicker AWT, Swing, JavaFX & SWT 6
S Tage zum Datum addieren AWT, Swing, JavaFX & SWT 2
S Swing zu einem Datum Tage addieren/subtrahieren AWT, Swing, JavaFX & SWT 6
K JavaFX DatePicker - Tage aktivieren/deaktivieren AWT, Swing, JavaFX & SWT 1
O JCalendar - Tage markieren AWT, Swing, JavaFX & SWT 2
E Kalender mit der Möglichkeit mehrere Tage zu selectieren AWT, Swing, JavaFX & SWT 3
A JXMonthView --> Tage markieren (flaggen) AWT, Swing, JavaFX & SWT 2
S Mehrere Tabellen Zellen gleichzeitig färben AWT, Swing, JavaFX & SWT 5
D JavaFX Label lässt sich nicht mehrmals färben AWT, Swing, JavaFX & SWT 7
P Bestimmte Kreise färben AWT, Swing, JavaFX & SWT 3
V JFreechart: In Linechart Linien einzeichnen und Bereiche färben AWT, Swing, JavaFX & SWT 4
M JavaFX TextArea einzelne Buchstaben färben AWT, Swing, JavaFX & SWT 3
T Swing Einzelne Teile eines Textes färben? AWT, Swing, JavaFX & SWT 10
S JavaFX Canvas - nur eine Figur auf der Zeichenfläche färben? AWT, Swing, JavaFX & SWT 1
A JLabel im Listener färben AWT, Swing, JavaFX & SWT 11
KrokoDiehl Swing Buchstaben im Label anders färben AWT, Swing, JavaFX & SWT 4
B jTable ganze Zeile anhand eines Kriterium färben AWT, Swing, JavaFX & SWT 6
S Images färben und transparenz ändern AWT, Swing, JavaFX & SWT 4
O Swing JTable - Zeilen färben (mit Model) AWT, Swing, JavaFX & SWT 13
N Swing Von 2 dimensionalem Array auf JTextfield schließen und färben AWT, Swing, JavaFX & SWT 6
R JTable für Stundenplan färben AWT, Swing, JavaFX & SWT 7
C JTree Einzelne Objekte färben AWT, Swing, JavaFX & SWT 4
chik Button zufällig färben AWT, Swing, JavaFX & SWT 7
M JTable einzelne Zeilen färben AWT, Swing, JavaFX & SWT 2
G Ein Wort in einem String färben in einer Canvas AWT, Swing, JavaFX & SWT 10
S in JTable eine Zeile färben AWT, Swing, JavaFX & SWT 5
G Bei JTable eine bestimmte Zelle färben AWT, Swing, JavaFX & SWT 11
L Again: In JTable bestimmte Zellen färben AWT, Swing, JavaFX & SWT 12
J Einzelnes Feld in JTable färben AWT, Swing, JavaFX & SWT 2

Ähnliche Java Themen


Oben