Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.awt.Font;

public class Main {
    public static Font createBoldFont(Font font) {
        if (font == null) {
            throw new NullPointerException("font == null");
        }
        String fontName = font.getName();
        int fontSize = font.getSize();
        return new Font(fontName, Font.BOLD, fontSize);
    }
}