I was given a font finder program, but I need to resize the applet... any suggestions on where and what code is needed to fit the applet to a specific size? If not, is there a setting in eclipse that will work?

public Dimension getPreferredSize() {
        return new Dimension(800,800);// this will not resize the applet

    public void paintComponent(Graphics g) {
        int x = getWidth()/2 - metrics.stringWidth(text)/2;// this will not resize the applet
        int y = getHeight() - 80; // this will not resize the applet


Re: Applet sizing problem 80 80

Just realized resizing goes under init().

setSize(500, 500);

It works now!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.