home *** CD-ROM | disk | FTP | other *** search
- import com.sun.java.swing.AbstractButton;
- import com.sun.java.swing.ImageIcon;
- import com.sun.java.swing.JApplet;
- import com.sun.java.swing.JButton;
- import java.applet.Applet;
-
- public class FancyButton extends JApplet {
- public void init() {
- ImageIcon var1 = new ImageIcon(((Applet)this).getImage(((Applet)this).getDocumentBase(), "magglass.gif"));
- JButton var2 = new JButton("Find something", var1);
- ((AbstractButton)var2).setVerticalTextPosition(3);
- ((AbstractButton)var2).setHorizontalTextPosition(0);
- ((AbstractButton)var2).setMnemonic('f');
- ((JApplet)this).getContentPane().add(var2);
- }
- }
-