/** * Calls the applet's resize * * @param width * @param height * @return void */ public void appletResize(int width, int height) { applet.resize(width, height); }
@Override public void appletResize(int width, int height) { wrappedApplet.resize(width, height); }
@Override public void resize(Dimension d) { minecraftApplet.resize(d); }
@Override public void resize(int width, int height) { wrappedApplet.resize(width, height); }
@Override public void resize(Dimension d) { wrappedApplet.resize(d); }
@Override public void resize(int width, int height) { minecraftApplet.resize(width, height); }
public void appletResize(int width, int height) { minecraftApplet.resize(width, height); }
import java.awt.*; import java.applet.*; public class DocFooter extends Applet { String date; String email; public void init() { resize(500,100); date = getParameter("LAST_UPDATED"); email = getParameter("EMAIL"); } public void paint(Graphics g) { g.drawString(date + " by ",100, 15); g.drawString(email,290,15); } }
import java.applet.Applet; import java.awt.Graphics; import java.awt.Image; public class ImageExample2 extends Applet { private Image bi; public void init() { resize(500, 500); System.out.println(getCodeBase()); // file:/D:/Workspace/JavaProject/bin/ // This the actual code that should be used to read the image in Applet bi = getImage(getCodeBase(), "images/222.png"); } public void paint(Graphics g) { g.drawImage(bi, 20, 140, this); } }
import java.awt.*; import javax.swing.*; public class Rect20degreeRotate extends JApplet{ public void init() { resize(500,500); Container DrawArea = getContentPane(); DrawArea.add( new JPanel(){ public void paintComponent(Graphics g) { Graphics2D g2 = (Graphics2D)g; int x[]={0,80,80,0}; int y[]={0,0,50,50}; g2.translate( 100, 100); for (int i=0;i<18;i++){ g2.rotate(20.0 * Math.PI / 180.0); g2.drawPolygon(x,y,4); } } } ); }
resize (width, height); diamond = new Diamond (); diamond.init (Color.green);
resize(d0, d0);
resize( DEFAULT_SIZE );
Dimension size = st.getPreferredSize(); Dimension sliderSize = opacitySlider.getPreferredSize(); resize(size.width, size.height+sliderSize.height); add("South", opacitySlider);
resize(190,190); setFont(new Font("Dialog",Font.BOLD,12)); addMouseListener(this);
resize(DEFAULT_SIZE);