GUI IOutlineHomework #1SolutionSimple Swing ApplicationStandard UI programApplication ArchitectureJava UI TopicsTop-Level ComponentsIntermediate ContainersBasic ControlsNon-editable DisplayEditable DisplayText ComponentsExamplesJComponents MethodsPrimary propertiesSecondary propertiesTertiary propertiesSwing ComponentsJLabelJMenuItemJButtonJRadioButtonJTextFieldComplex componentsJListJComboBoxExampleDialog IssueGUI IIS 3132.6.03OutlineHomework #1 solutionGUI componentsHomework #1Ave: 10.5High: 12Low: 8but ...SolutionMemberMapSimple Swing ApplicationStandard UI programMain programCreates a windowAdds componentsDisplaysComponent makerCreates, customizes componentsSets event handlersApplication ArchitectureJava UI TopicsUI ComponentsContainment hierarchyLayout managementEvent handlingTop-Level ComponentsApplet Dialog FrameIntermediate ContainersPanelScrollPaneTabbedPaneSplitPaneToolbarBasic ControlsButtons ListComboBoxTextFieldSliderMenuNon-editable DisplayProgressBarLabel ToolTipEditable DisplayTextTable TreeText ComponentsExamplesExample 2two-tiered architectureExample 3specialized component designJComponents MethodsPrimary propertieshow it appearsSecondary propertiesrole in the interfacevisual relationship to other componentsTertiary propertiescomputational propertiescontent propertiesPrimary propertiesBorderColorforegroundbackgroundFontLocaleSizeminimum sizemaximum sizepreferred sizeactual sizeVisibleSecondary propertiesEnabledContainmentparentchildrenDrag and DropFocusacceptskeys to traverseToolTipTertiary propertiesContentdifferent for every type of componentComputationallistenersall availableone typically usedSwing ComponentsSubclasses of JComponentall primary and secondary propertiesPlus component-specific propertiesPlus relevant listenersJLabelContent propertyTextJMenuItemHierarchyJMenuBarJMenuJMenuItemContentTextComputationActionEventSubtypesJCheckboxMenuItemJRadioButtonMenuItemJMenuJButtonContentTextComputationActionListenerJRadioButtonContentTextSelectedRelationshipButtonGroupJTextFieldContentTextEditableComputationActionListenerhandle return or tabKeyListenerhandles individual letters typedComplex componentsContent is represented indirectlymodelModel = interfaceIdeaComponent C uses Model Mexisting data Dcreate wrapper class encapsulating D implementing interface Mdata is displayable in CJListContentListModelComputationMouseListenerSelectionModelJComboBoxCombination of text field and listContentComboBoxModelComputationActionEventExampleLabelTextFieldJButtonJRadioButton, JList, JComboBoxDialog IssueUI components are both input and outputInputstate of the control when user clicks “OK”Outputstate of the control when it is shownshould reflect state of
View Full Document