import java.awt.*;public class BildInCanvas extends java.applet.Applet { Button a = new Button ("a"); Button b = new Button ("b"); LogoCanvas logo = new LogoCanvas(); GridBagLayout gridbag = new GridBagLayout(); GridBagConstraints constraints = new GridBagConstraints(); void buildConstraints (GridBagConstraints gbc, int gx, int gy, int gw, int gh, int wx, int wy) { gbc.gridx = gx; gbc.gridy = gy; gbc.gridwidth = gw; gbc.gridheight = gh; gbc.weightx = wx; gbc.weighty = wy; } public void init() { setBackground(Color.black); setLayout (gridbag); buildConstraints (constraints,0,1,1,1,100,100); gridbag.setConstraints(crypt,constraints); add(crypt); buildConstraints (constraints,2,1,1,1,100,100); gridbag.setConstraints(encrypt,constraints); add(encrypt); buildConstraints (constraints,1,0,1,1,100,100); gridbag.setConstraints(logo,constraints); add(logo); } }class LogoCanvas extends java.awt.Canvas{ public void paint(Graphics g){ g.drawImage(logi,2,2,this); }}