画板
结束 4 设计UML类图
Draw1 main(args:String[]):void DrawPanel f:int sx:int sy:int x:int y:int fill:boolean flag:boolean mousePressed():void mouseReleased():void mouseDragged():void mouseEntered():void mouseExited():void mouseClicked():void mouseMoved():void actionPerforned():void stateChanged():void
绘图程序UML类图
5 设计层次结构树 JPanel West-left (Vertial Box Layout) JPanel Center-right JPanel (Border Layout) JFrame JRadioButton JRadioButton JRadioButton JRadioButton JRadioButton JCheckBox JButton JButton JSlider JLabel
6 运行结果与分析
6.1 整体画板展示
画板分析:
利用盒式布局管理器将所有的组件(包括5个JRadioButton, 1个JCheckBox,2个JButton以及一个JSlider)进行布局,再利用边界布局管理器对面板进行位置编排,绘图面板在中间(Center),另一个在西边(West)。
6.2用曲线、直线、圆、矩形画黑白小屋子
6.3用粗线写祝福语