Graphical User Interface (GUI)Containers and ComponentsContainers provide a rectangular display area in whichcomponents are positioned. A container can also containother containers. Components are positioned relative to the top left corner(O,O) of its container and are located using the container'scoordinate space. Components are added to a container using the addOmethod
Graphical User Interface (GUI) Containers and Components • Containers provide a rectangular display area in which components are positioned. A container can also contain other containers. • Components are positioned relative to the top left corner (0,0) of its container and are located using the container’s coordinate space. • Components are added to a container using the add() method
Containers/ComponentsContainers:JFrame, equivalentto windows.JPanel, applet's display area is JPanel. It is often used to organizecomponentstogetherindisplayAtomic Components:JButtons(JCheckBoxes,JRadioButtons)JComboBoxJLabelsJTextField (JTextArea)PopupmenusScrollPane
Containers/Components Containers: JFrame, equivalent to windows. JPanel, applet’s display area is JPanel. It is often used to organize components together in display. Atomic Components: JButtons (JCheckBoxes, JRadioButtons) JComboBox JLabels JTextField (JTextArea) Popup menus ScrollPane