用JNI封装了一个Win32 dll(读取特定文件),swing GUI调用时,JNI方法返回结果都正常,但是调用该方法一次以后,GUI上未加载的界面(JFrame,JDialog,JPanel)打开后,上面的图片(如JButton,JLabel图标等)会部分丢失,在调用JNI方法前已经加载的界面上的图片则还在。java无任何错误输出,多次调用该方法后GUI内存也无明显增长。请问这可能是什么原因呢?
解决方案 »
- 菜鸟求解各位大侠很菜问题,
- 空指针异常求解
- 在无返回值的方法中使用【break和return】,效果居然等同?
- HttpClient能否直接获取服务器的request对象
- 求助!!!为什么我连不上数据库???
- 怎么判断SQL中的Connection对象已经断连?
- 关于objoutputstream问题
- 大家帮忙。用jsp可以连接成功sqlserver2000,但java程序却连接不上?谢谢
- 为什么总是得到“Cannot load driver ‘org.gjt.mm.mysql.Driver’”
- 中国商品交易中心技术部招聘Java程序员。
- Lucene在cmd下执行时,发生找不到类的错误!求指教!
- 问一个一会就很可能被和谐掉的问题
到底什么情况,楼主说的再具体点
"ico"= ImageIcon (id=345)
accessibleContext= null
description= ".\\img\\new.gif"
filename= ".\\img\\new.gif"
height= -1
image= ToolkitImage (id=363)
imageObserver= null
loadStatus= 4
location= null
width= -1
用
Btn_xxx.repaint();
Btn_xxx.updateUI();还是一样,不显示该按钮图标。
"ico"= ImageIcon (id=429)
accessibleContext= null
description= ".\\img\\icon\\refresh.gif"
filename= ".\\img\\icon\\refresh.gif"
height= 24
image= ToolkitImage (id=431)
imageObserver= null
loadStatus= 8
location= null
width= 24 看了一下JDK,loadStatus = 8 是图像正常, loadStatus = 4 是图像加载错误/**
* Flag indicating that the downloading of media encountered
* an error.
* @see java.awt.MediaTracker#statusAll
* @see java.awt.MediaTracker#statusID
*/
public static final int ERRORED = 4; /**
* Flag indicating that the downloading of media was completed
* successfully.
* @see java.awt.MediaTracker#statusAll
* @see java.awt.MediaTracker#statusID
*/
public static final int COMPLETE = 8;