Jump to content

Drawing complex shapes

0% developed
From Wikibooks, open books for an open world

Navigate User Interface topic:v  d  e )


Computer code Code listing 9.4: Drawing complex shapes
public class Hello {
    JLabel label = newJLabel("Hello, Mundo!");
    JFrame frame = new JFrame("BK*");
    frame.add(label);

    frame.setSize(300, 300);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setVisible(true);
    frame.setLocationRelativeTo(null);
    frame.toFront();
    }
}