проблема не в том, что невозможно получить значение, отображаемое из jtable в jspinner. вот мой jtablemouseclickedeven
private void jTable1MouseClicked(java.awt.event.MouseEvent evt) {
if(evt.getClickCount()==1){
jLabel5.setText(jTable1.getValueAt(jTable1.getSelectedRow(), 0).toString());
jTextField4.setText(jTable1.getValueAt(jTable1.getSelectedRow(), 1).toString());
jTextField5.setText(jTable1.getValueAt(jTable1.getSelectedRow(), 2).toString());
jTextField6.setText(jTable1.getValueAt(jTable1.getSelectedRow(), 3).toString());
jSpinner1.setValue(jTable1.getValueAt(jTable1.getSelectedRow(), 4).toString());
}
}
jspinner отформатирован как MM / dd / yyyy, поэтому jtable также ...
спасибо всем, кто мог бы помочь мне снова ...
вот ошибка, которую я получаю:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: illegal value
at javax.swing.SpinnerDateModel.setValue(SpinnerDateModel.java:440)
at javax.swing.JSpinner.setValue(JSpinner.java:329)
at UsernamePasswordPackage.MainForm.jTable1MouseClicked(MainForm.java:930)
at UsernamePasswordPackage.MainForm.access$1600(MainForm.java:34)
at UsernamePasswordPackage.MainForm$17.mouseClicked(MainForm.java:337)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
at java.awt.Component.processMouseEvent(Component.java:6270)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6032)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4247)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
спасибо