What is the difference between scrollbar and scrollpane

A Scrollbar is a Component, but not a Container whereas Scrollpane is a Conatiner and handles its own events and perform its own scrolling. In Core Java, a Scrollbar and a ScrollPane are two distinct components used for handling scrolling behavior in graphical user interfaces. Here’s the difference between them: Scrollbar: A Scrollbar is a … Read more

What is the difference between choice and list?

?– A Choice is displayed in a compact form that requires you to pull it down to see the list of available choices and only one item may be selected from a choice. A List may be displayed in such a way that several list items are visible and it supports the selection of one … Read more

What is meant by controls and what are different types of controls in AWT?-

Controls are components that allow a user to interact with your application and the AWT supports the following types of controls: Labels, Push Buttons, Check Boxes, Choice Lists, Lists, Scrollbars, Text Components. These controls are subclasses of Component. In the context of Core Java and AWT (Abstract Window Toolkit), “controls” typically refer to user interface … Read more

What is adapter class

An adapter class provides an empty implementation of all methods in an event listener interface. Adapter classes are useful when you want to receive and process only some of the events that are handled by a particular event listener interface. You can define a new class to act listener by extending one of the adapter … Read more

What is source and listener

source : A source is an object that generates an event. This occurs when the internal state of that object changes in some way. listener : A listener is an object that is notified when an event occurs. It has two major requirements. First, it must have been registered with one or more sources to … Read more