All About INTERFACE ComponentPeer in AWT in Java

The ComponentPeer Interface specifies the methods that all implementations of Abstract Window Toolkit must define while working with Component.
The structure of interface ComponentPeer is given as:

public interface java.awt.peer.ComponentPeer{
//Methods
public abstract void disable();
public abstract void dispose();
public abstract void enable();
public abstract void hide();
public abstract void nextFocus();
public abstract void requestFocus();
public abstract void show();
public abstract void setForeground(Color c);
public abstract void setBackground(Color c);
public abstract void setFont(Font f);
public abstract void reshape(int x,int y,int width,int height);
public abstract void paint(Graphics g);
public abstract void repaint(long tm,int x,int y,int width,int height);
public abstract ColorModel getColorModel();
public abstract FontMetrics getFontMetrics(Font f);
public abstract Graphics getGraphics();
public abstract Toolkit getToolkit();
public abstract Dimension minimumSize();
public abstract Dimension preferredSize();
public abstract boolean handleEvent(Event e);
public abstract boolean prepareImage(Image img,int w,int h,ImageObserver o);
public abstract int checkImage(Image img,int w,int h,ImageObserver o);
public abstract Image createImage(ImageProducer p);
public abstract Image createImage(int w,int h);
}
 
All About INTERFACE ComponentPeer in AWT in Java All About INTERFACE ComponentPeer in AWT in Java Reviewed by Animesh Chatterjee on November 01, 2018 Rating: 5

No comments:

Powered by Blogger.