摘要:
一个GUI程序是具有数个thread的,这些thread之中有一个被称为时间派发(event-dispatching) thread。这个thread运行程序中所有与事件有关的回调(callback),如打字游戏中的actionPerformed()与keyPressed()方法。对所有Swing对象的访问都必须发生在此thread中。之所以需要这样的原因是Swing并没有用同步来访问本身对象的复杂内在状态。以JSlider对象为例,它有个用来指示slider位置的单一值。如果使用者正在改变此slider的位置,该值可能正位于中间或尚未确定的状态,这样的处理全部都是发生在事件派发thread中
阅读全文
posted @ 2011-09-20 10:57
网络大豆
阅读(196)
推荐(0)
摘要:
http://blog.csdn.net/mq612/article/details/1254349 importjava.awt.BorderLayout;importjava.awt.Color;importjava.awt.event.ActionEvent;importjava.awt.event.ActionListener;importjava.io.File;importjavax.swing.BorderFactory;importjavax.swing.Box;importjavax.swing.ImageIcon;importjavax.swing...
阅读全文
posted @ 2011-09-20 10:05
网络大豆
阅读(1421)
推荐(0)
摘要:
与以前帖子中提到的原因(JXSE的bug)不一样,不过这个也蛮奇怪的。异常堆栈提示并不明显。在一堆日志中发现这么几行:Exception in startApp() : jxmessenger.jxse.presenceservice.PresenceServiceImpl@1a33efbjava.lang.NullPointerExceptionLine 202 net.jxta.socket.JxtaMulticastSocket.joinGroup().... Service failed to start (-1) : jxmessenger.jxse.presenceservice.
阅读全文
posted @ 2011-09-19 16:11
网络大豆
阅读(752)
推荐(1)
摘要:
具体原因还不知道。只知道在检查messenger时报错。似乎跟客户端代码无关,JXSE内部问题。
阅读全文
posted @ 2011-09-19 12:43
网络大豆
阅读(351)
推荐(0)
摘要:
http://www.15897.com/blog/post/Linux-ps-kill.html最近夜火我在折腾Ubuntu 9.04系统,直接硬盘安装在学校的机器上,已经折腾了3天了。第一天全放在了重装windows XP和安装整理必要文件上了;第二天安装了GRUB4DOS,硬盘引导加载 Ubuntu-9.04-desktop-i386.iso 文件安装Ubuntu,但是装好之后一直memtest内存测试,引导不进系统;这第三天又捣鼓了1天的grub,最终还是不行,没有vmlinuz-2.6.28-11-generic文件。明天继续。。。学校的破网络,只能上百度首页和看PPS,其他什么都不
阅读全文
posted @ 2011-09-19 00:19
网络大豆
阅读(747)
推荐(0)
摘要:
/Files/cuizhf/SwingSet2.jar.txt双击执行,或命令行:java -jar SwingSet2.jar
阅读全文
posted @ 2011-09-15 10:03
网络大豆
阅读(626)
推荐(0)
摘要:
http://johnjobe.iteye.com/blog/1017984在实现数据挖掘一些算法或者是利用空间向量模型来发现相似文档的时候,会遇到求两个集合的交集的情况。以前一般是采用比较笨拙的办法,依次遍历其中一个集 合的元素,然后判断它是否包含在另一个集合中。这样做非常机械繁琐,代码编得让人心烦,其实java的api中提供了对集合进行交、并、差运算的功能,灰 常强大!看下面的例子:1.publicclassSetOpt{2.3.publicListintersect(Listls,Listls2){4.Listlist=newArrayList(Arrays.asList(newObje
阅读全文
posted @ 2011-09-14 21:33
网络大豆
阅读(1191)
推荐(0)
摘要:
一共执行了10次,每次先用PropertyUtils.copyProperties,再用逐个域值拷贝的方式。奇怪的时第一次中使用PropertyUtils.copyProperties居然用了530毫秒,这是为什么呢??虽然使用PropertyUtils.copyProperties,会方便一些,但性能确实下降了很多(第一次)。5300---------------------1-------------------------10---------------------2-----------------------11---------------------3------------.
阅读全文
posted @ 2011-09-14 20:44
网络大豆
阅读(954)
推荐(0)
摘要:
http://blogs.oracle.com/geertjan/entry/programmatically_putting_topcomponents_in_modesFirst a picture: 图片略 The list of menu items above appears when the TopComponent's tab is right-clicked. When a menu item is selected, the TopComponent moves to the selected mode. Next, the two things you need .
阅读全文
posted @ 2011-09-14 12:23
网络大豆
阅读(368)
推荐(0)
摘要:
http://netbeans.dzone.com/news/secrets-netbeans-window-system&sa=U&ei=JPBvTqSlNsSXiQfC1JGsCQ&ved=0CCQQFjAI&usg=AFQjCNEZyrb8mNth56umvuSGJiGKj3JCnAToday I learned about some hidden options of the NetBeans Window System. These can't be set via user interface elements in the NetBeans
阅读全文
posted @ 2011-09-14 08:50
网络大豆
阅读(442)
推荐(0)