Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class TestTest extends Frame {
- Font myFont = new Font("Rockwell Nova", Font.PLAIN, 12);
- Graphics2D g2d;
- public TestTest() {
- Label myLabel = new Label() {
- public void update(Graphics g) { paint(g); }
- public void paint(Graphics g) {
- g.setFont(myFont);
- g.drawString("ROBOTO CONDENSED, THIS DOES NOT WORK!", 0, 20);
- }
- };
- setSize(500,200);
- setLocation(10,10);
- setUndecorated(false);
- myLabel.setBackground(Color.red);
- add(myLabel, BorderLayout.SOUTH);
- setVisible(true);
- }
- public void paint(Graphics g) {
- g2d = (Graphics2D) g;
- g2d.setStroke(new BasicStroke(0.0f));
- g2d.setFont(myFont);
- g2d.setColor(Color.BLACK);
- g2d.drawString("ROBOTO CONDENSED THIS WORKS!",50, 50);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement