Abstract Interface MenuContainer in Java

0
18
Spread the love
  • 28
  • 34
  • 56
  • 35
  •  
  •  
  •  
  • 12
  •  
  •  
    165
    Shares

Abstract Interface MenuContainer in Java

MenuContainer is an interface that defines the responsibilities for objects that can have a menu.

The structure of the abstract Interface MenuContaineris given by

public abstract interface java.awt.MenuContainer
extends java.lang.Object {
// Interface Methods
public abstract Font getFont();
public abstract boolean postEvent (Event e);
public abstract void remove (MenuComponent component);
}

The details of the class structure are given as follows:

public abstract Font getFont();

public abstract Font getFont() method returns the current font of the object implementing this method.

This method returns the current font of the object implementing this method.

public abstract boolean postEvent (Event e);

public abstract boolean postEvent (Event e) method posts event to the object implementing this method.

This method actually ignores return value.

Parameter
e – Event to post.

public abstract void remove (MenuComponent component);

public abstract void remove (MenuComponent component) method instructs the object implementing this method to remove a menu component.

Parameter
component – Menu object to remove

Don't miss out!
Subscribe To Newsletter

Receive top technical news, lesson ideas, travel tips and more!

Invalid email address
Give it a try. You can unsubscribe at any time.

Spread the love
  • 28
  • 34
  • 56
  • 35
  •  
  •  
  •  
  • 12
  •  
  •  
    165
    Shares

LEAVE A REPLY

Please enter your comment!
Please enter your name here