字体选择器JFontChooser
摘要:http://sourceforge.jp/projects/jfontchooser/________________________________________________________/Files/cuizhf/jfontchooser-1.0.5-src.zip/Files/cuizhf/jfontchooser-sample-1.0.5-all-bin.zip
阅读全文
posted @
2011-10-29 14:36
网络大豆
阅读(322)
推荐(0)
Java Look and Feel Graphics Repository 1.0
摘要:http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-java-client-419417.html#7520-jlf-1.0-oth-JPR/Files/cuizhf/jlfgr-1_0.zip
阅读全文
posted @
2011-10-29 13:43
网络大豆
阅读(312)
推荐(0)
danger JLabel.settext() in another thread
摘要:http://www.velocityreviews.com/forums/t135432-danger-jlabel-settext-in-another-thread.html———————————————————————————————————————————————————————————————— Yamin Guest Posts: n/a ...
阅读全文
posted @
2011-10-23 00:26
网络大豆
阅读(341)
推荐(0)
使用Collections.emptyMap()引起的一个奇怪的问题
摘要:以下是控制台信息:Line 820 net.jxta.impl.resolver.ResolverServiceImpl.processQuery()Uncaught Throwable from handler for : urn:jxta:cbid-DC007D31BB964091A351ABE04C5FE39C05java.lang.UnsupportedOperationExceptionLine 203 java.util.AbstractMap.put()Line 89 jxmessenger.jxse.api.queryservice.QueryMessage.addOptio.
阅读全文
posted @
2011-10-22 12:06
网络大豆
阅读(1578)
推荐(0)
转:浅析 Java Thread.join()
摘要:http://bingoit.iteye.com/blog/457073——————————————————————————————————————————————————————————————一、在研究join的用法之前,先明确两件事情。 1.join方法定义在Thread类中,则调用者必须是一个线程, 例如: Thread t = new CustomThread();//这里一般是自定义的线程类 t.start();//线程起动 t.join();//此处会抛出InterruptedException异常 2.上面的两行代码也是在一个线程里面执行的。 以上出现了两个线程,一个是我们..
阅读全文
posted @
2011-10-12 10:50
网络大豆
阅读(256)
推荐(0)
温少的Java并发程序设计教程
摘要:材料很好,直接贴过来了这是其博客地址http://www.cnblogs.com/jobs/。Java并发程序设计教程-2010-08-10.pdf
阅读全文
posted @
2011-10-12 08:57
网络大豆
阅读(259)
推荐(0)
转:偶实现了贴图和表情的聊天
摘要:http://www.cnblogs.com/jobs/archive/2007/03/30/694518.html——————————————————————————————————————————————————————贴图的实现方式为:1、把剪切板中的图片存在本地的SendingImages目录,存放的格式使用PNG,当然可以其他格式,但是PNG格式更小。2、使用MD5算法产生一个ImageID。当然可以使用SHA1等其他算法3、把imageID发送remote peer4、当remote peer收到imageID时,检查本地ReceivedImage目录,如果已经存在,显示图片,不存
阅读全文
posted @
2011-10-12 00:10
网络大豆
阅读(193)
推荐(0)
转:Interrupting Java threads
摘要:http://www.techrepublic.com/article/interrupting-java-threads/5144546原文链接的评论也很精彩!!! —————————————————————————————————————————————————————————————————— By Alexandre Pereira Calsavara February 3, 2004, 8:00am PST Writing mu...
阅读全文
posted @
2011-10-11 11:10
网络大豆
阅读(311)
推荐(0)
转:javax.swing.Timer的简单使用
摘要:http://www.cnwing.net/more.asp?name=yangmingkkk&id=157862-————————————————————————————————————————————————————————————/**简单的测试javax.swing.Timer的用法*@author:杨明*2006-11-20*/importjava.awt.event.ActionEvent;importjava.awt.event.ActionListener;importjava.util.Date;importjavax.swing.Timer;publicclassT
阅读全文
posted @
2011-10-10 18:35
网络大豆
阅读(1974)
推荐(0)
转:体验Java SE 6 中的 GroupLayout
摘要:http://www.blogjava.net/esls2008/archive/2006/12/18/88548.html--------------------------------------------------------------------------------------- Java SE 6 中包含一个新的 GroupLayout ,从GroupLayout的单词意思来看,它是以Group(组)为单位来管理布局,也就是把多个组件(如:JLable、JButton)按区域划分 到不同的Group(组),再根据各个Group(组)相对于水平轴(Horizontal)和垂.
阅读全文
posted @
2011-10-09 11:45
网络大豆
阅读(549)
推荐(1)
转:Java基于Socket文件传输示例
摘要:http://www.blogjava.net/sterning/archive/2007/10/13/152508.html--------------------------------------------------------------------------------------------------------------------------------最近需要进行网络传输大文件,于是对基于socket的文件传输作了一个初步的了解。在一位网友提供的程序基础上,俺进行了一些加工,采用了缓冲输入/输出流来包装输出流,再采用数据输入/输出输出流进行包装,加快传输的速度。废话
阅读全文
posted @
2011-10-09 09:30
网络大豆
阅读(438)
推荐(0)
java反编译工具jd-gui-0.3.3.windows
摘要:This is README file for Java Decompiler.JD home page: http://java.decompiler.free.frCopyright 2008-2010 Emmanuel Dupuy.1. Installation.No installation and no setup are required.2. DescriptionJD-GUI is a standalone graphical utility that displays Java source codes of ".class" files. You can
阅读全文
posted @
2011-09-24 16:06
网络大豆
阅读(1495)
推荐(0)
java鼠标双击和右键事件处理
摘要:http://hi.baidu.com/kaka888/blog/item/baddcb1bb3c9b5fbae513376.htmlpublicclassMyMouseListenerextendsMouseAdapter{publicvoidmouseClicked(MouseEventevt){if(evt.getClickCount()==3){//处理鼠标三击}elseif(evt.getClickCount()==2){//处理鼠标双击}}}处理鼠标右键publicmouseClicked(MouseEvente){if(e.isMetaDown()){//检测鼠标右键单击}如何在
阅读全文
posted @
2011-09-23 12:05
网络大豆
阅读(5104)
推荐(0)
判断ImageIcon创建成功
摘要:ImageIconimageIcon=newImageIcon(file.getPath());if(imageIcon.getImageLoadStatus()==MediaTracker.COMPLETE){editTP.insertIcon(newImageIcon(file.getPath()));}else{//图像加载失败,igonre}
阅读全文
posted @
2011-09-23 09:59
网络大豆
阅读(348)
推荐(0)
带返回值的函数如何在内部同步?
摘要:《Java线程》第三版中找到的一个例子(见P163):pubilcintgetCorrectNum(intc){synchronized(correctChars){Integerkey=newInteger(c);Integernum=(Integer)correctChars.get(key);if(num==null){return0;}returnnum.intValue();}} 原来synchronized块可以直接把返回语句包括其中。
阅读全文
posted @
2011-09-22 18:42
网络大豆
阅读(314)
推荐(0)
JTextPane/DefaultStyledDocument的序列化的相关问题
摘要:java.io.InvalidClassException: javax.swing.text.DefaultStyledDocument; local class incompatible: stream classdesc serialVersionUID = 940485415728614849, local class serialVersionUID = 7691029896427935656 at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:579) at java.io.ObjectInputStre
阅读全文
posted @
2011-09-21 16:37
网络大豆
阅读(709)
推荐(0)
JTextPane自动滚动到末尾
摘要:javax.swing.text.Documentdoc=jTextPane.getDocument();jTextPane.setCaretPosition(doc.getLength());
阅读全文
posted @
2011-09-21 12:00
网络大豆
阅读(301)
推荐(0)
Java Swing之StyledDocument的合并
摘要:http://blog.fyent.net/2011/01/java_swing_merge_styleddocument/publicvoidmergeDocument(DefaultStyledDocumentsource,DefaultStyledDocumentdest)throwsBadLocationException{ArrayListspecs=newArrayList();DefaultStyledDocument.ElementSpecspec=newDefaultStyledDocument.ElementSpec(newSimpleAttributeSet(),Defa
阅读全文
posted @
2011-09-20 23:37
网络大豆
阅读(1011)
推荐(0)
How to Use File Choosers
摘要:http://download.oracle.com/javase/tutorial/uiswing/components/filechooser.html
阅读全文
posted @
2011-09-20 21:49
网络大豆
阅读(183)
推荐(0)
Swing Threading的限制
摘要:一个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)