摘要:
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)
推荐(0)
摘要:
http://download.oracle.com/javase/tutorial/uiswing/components/filechooser.html 阅读全文
posted @ 2011-09-20 21:49
网络大豆
阅读(183)
评论(0)
推荐(0)
摘要:
首先看几个connect方法/***ConnecttoaJxtaServerPipewithdefaulttimeout**@paramgroupgroupcontext*@parampipeAdPipeAdvertisement*@throwsIOExceptionifanioerroroccurs*/publicvoidconnect(PeerGroupgroup,PipeAdvertisementpipeAd)throwsIOException{connect(group,pipeAd,timeout);}/***ConnectstoaremoteJxtaBiDiPipe**@param 阅读全文
posted @ 2011-09-20 13:50
网络大豆
阅读(430)
评论(0)
推荐(0)
摘要:
一个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)
推荐(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)
推荐(0)
浙公网安备 33010602011771号