摘要
利用Swing进行GUI设计时,分析容器的体系结构对于组件的加载和布局十分重要。重型容器的结构复杂,要从其子对象JRootPane入手,分析该类的结构,明确根板、层板、内容板、玻璃板等概念,理解容器的体系结构和管理结构。正确运用顶层容器类提供的方法,通过两种方式处理容器的内容板,加载和布局组件,达到GUI的设计要求。
As Swing-based GUI designing, analysing containment hierarchies is important for adding components and setting their layout. The structure of weight-container is complex,we should make a entrance with JRootPane object, analyse it's structure,clear the conception about root pane,layered pane,content pane,glass pane etc.,understand the containment hierar- chie and management hierarchie. Using methods provided by top-level containers correctly, we can handle the content pane of containers by two ways, add components and set layout, achieve the demands of GUI design.
出处
《电脑编程技巧与维护》
2009年第8期18-19,29,共3页
Computer Programming Skills & Maintenance
关键词
GUI设计
重型容器
体系结构
管理结构
内容板
GUI design
weight-container
containment hierarchie
management hierarchie
content pane