ava AWT Scrollbar
The object of Scrollbar class is used to add horizontal and vertical scrollbar. Scrollbar is a GUI component allows us to see invisible number of rows and columns.
AWT Scrollbar class declaration
Java AWT Scrollbar Example
Output:
Java AWT Scrollbar Example with AdjustmentListener
Output:
Java AWT MenuItem and Menu
The object of MenuItem class adds a simple labeled menu item on menu. The items used in a menu must belong to the MenuItem or any of its subclass.
The object of Menu class is a pull down menu component which is displayed on the menu bar. It inherits the MenuItem class.
AWT MenuItem class declaration
AWT Menu class declaration
Java AWT MenuItem and Menu Example
Output:
ava AWT PopupMenu
PopupMenu can be dynamically popped up at specific position within a component. It inherits the Menu class.
AWT PopupMenu class declaration
Java AWT PopupMenu Example
Output:
Comments
Post a Comment