JFrame frame = new JFrame(); JButton component1 = new JButton("1"); JButton component2 = new JButton("2"); JButton component3 = new JButton("3"); // B... ...
分类:
其他好文 时间:
2018-09-06 11:03:00
阅读次数:
142
When the focus is on a component, any focus traversal keys set for that component override the default focus traversal keys. For an example of how to ...
分类:
其他好文 时间:
2018-09-06 10:59:03
阅读次数:
158
This example changes the focus traversal keys for the entire application. For an example of how to change the focus traversal keys for a particular co ...
分类:
移动开发 时间:
2018-09-06 10:55:14
阅读次数:
215
HashTable是什么 HashTable跟HashMap一样,同样是链表散列的数据结构,从源码中我们可以看出,Hashtable 继承于Dictionary类,实现了Map, Cloneable,Serializable接口 Hashtable成员变量 Hashtable构造方法 Hashtab ...
分类:
编程语言 时间:
2018-09-05 21:49:14
阅读次数:
173
如果某脚本要运行30分钟,可以在Crontab里把脚本间隔设为至少一小时来避免冲突。而比较糟的情况是可能该脚本在执行周期内没有完成,接着第二个脚本又开始运行了。如何确保只有一个脚本实例运行呢?一个好用的方法是利用lockf(FreeBSD 8.1下为lockf,CentOS 5.5下为flock), ...
分类:
其他好文 时间:
2018-09-05 17:59:19
阅读次数:
317
<!DOCTYPE> 声明必须是 HTML 文档的第一行,位于 <html> 标签之前。<!DOCTYPE> 声明不是 HTML 标签;它是指示 web 浏览器关于页面使用哪个 HTML 版本进行编写的指令。 html 文档结构: 1, <!DOCTYPE Hhtml> 声明为html5 文档. 2 ...
分类:
Web程序 时间:
2018-09-04 22:08:55
阅读次数:
314
EL表达式中fn函数 JSTL 使用表达式来简化页面的代码,这对一些标准的方法,例如bean的getter/setter方法,请求参数或者context以及 session中的数据的访问非常方便,但是我们在实际应用中经常需要在页面调用对象的某些方法,例如我需要调用字符串的length方法来获取字符串 ...
分类:
其他好文 时间:
2018-09-03 15:32:56
阅读次数:
186
Shape getTextShape(Graphics2D g2d, String str, Font font) { FontRenderContext frc = g2d.getFontRenderContext(); TextLayout tl = new TextLayout(str, fo... ...
分类:
其他好文 时间:
2018-09-02 23:54:06
阅读次数:
198
component.addMouseListener(new MyMouseListener()); public class MyMouseListener extends MouseAdapter { public void mouseClicked(MouseEvent evt) { if (... ...
分类:
其他好文 时间:
2018-09-02 23:51:48
阅读次数:
165
// See also e551 精简的Applet public void init() { // Load audio clip AudioClip ac = getAudioClip(getDocumentBase(), "http://hostname.com/audio.au"); // ... ...
分类:
移动开发 时间:
2018-09-02 21:42:58
阅读次数:
208