当前位置: 代码迷 >> Java相关 >> 我用java写了一个地址簿程序,然后又建立了一个数据库保存地址簿,数据库与程 ...
  详细解决方案

我用java写了一个地址簿程序,然后又建立了一个数据库保存地址簿,数据库与程 ...

热度:328   发布时间:2008-10-31 14:09:40.0
我用java写了一个地址簿程序,然后又建立了一个数据库保存地址簿,数据库与程序连接没有问题,但是运行后在对话框里新添加的资料怎么保存不进数据库锕,下面是出错提示
错误提示:  Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problems:
    Element cannot be resolved to a type
    Element cannot be resolved to a type
    Element cannot be resolved to a type
    Element cannot be resolved to a type
    Element cannot be resolved to a type
    Element cannot be resolved to a type
    Element cannot be resolved to a type
    Element cannot be resolved to a type
    Element cannot be resolved to a type
    Element cannot be resolved to a type
    Element cannot be resolved to a type
    Element cannot be resolved to a type
    Element cannot be resolved to a type
    Element cannot be resolved to a type
    Element cannot be resolved to a type
    Element cannot be resolved to a type
    Document cannot be resolved to a type
    Document cannot be resolved to a type
    Format cannot be resolved to a type
    Format cannot be resolved
    XMLOutputter cannot be resolved to a type
    XMLOutputter cannot be resolved to a type

    at addresslist.MyFrame.jButton1_actionPerformed(MyFrame.java:265)
    at addresslist.MyFrame_jButton1_actionAdapter.actionPerformed(MyFrame_jButton1_actionAdapter.java:14)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
搜索更多相关的解决方案: java  数据库  对话框  提示  

----------------解决方案--------------------------------------------------------
Element
Format
XMLOutputter
import以上类或接口
----------------解决方案--------------------------------------------------------
还是不太明白,版主能给我说详细点吗?超谢谢你了,
----------------解决方案--------------------------------------------------------
如果你没有在开头写上import javax.swing.*;你能在里面用JTextField么?!

你的错误提示Element、Format、XMLOutputter不能解析为一种类型,表明你没有导入相应的包
----------------解决方案--------------------------------------------------------
  相关解决方案