计算机与现代化 ›› 2010, Vol. 1 ›› Issue (01): 185-187.doi: 10.3969/j.issn.2010.01.052

• 应用与开发 • 上一篇    下一篇

Java2 Swing组件扩充的研究与实现

王乐,周琪云,肖小方,晋海峰   

  1. 江西师范大学计算机信息工程学院,江西 南昌 330022
  • 收稿日期:2009-02-09 修回日期:1900-01-01 出版日期:2010-01-15 发布日期:2010-01-15

Research and Implementation of Java2 Swing Component Expansion

WANG Le,ZHOU Qi-yun,XIAO Xiao-fang,JIN Hai-feng   

  1. College of Computer & Information Engineering, Jiangxi Normal University, Nanchang 330022, China
  • Received:2009-02-09 Revised:1900-01-01 Online:2010-01-15 Published:2010-01-15

摘要: Java2 Swing标准组件可以满足一般桌面程序的需求,但在实际的项目中会碰到一些特殊需求的组件,这些特殊组件往往是标准组件的组合或者功能的改写。本文首先对Swing组件的体系结构进行阐述,然后逐一分析Swing组件的组成对象,最后给出对Swing组件进行扩展的步骤,以及对JMenuBar组件进行扩充实现多级下拉菜单的关键代码。

关键词: Java2 Swing组件, 多级下拉菜单

Abstract: Java2 Swing standard components to meet the general needs of the desktop program, but the actual projects will encounter needs of some special components, these special components are often a combination of standard components or features of the rewrite. First, this article describes the architecture of Swing components, then analyzes each of the Swing components of the composition of the object, gives the standard components of the expansion of the steps and multistage pull-down menu to realize the key to the code at last.

Key words: Java2 Swing component, pull-down menu

中图分类号: