Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
842 B
1
Indexable
Never
package com.view;

import javax.swing.*;
import java.awt.*;
import java.io.IOException;
import java.io.InputStream;

public class View {
    static Font customFont;
    public static void main(String[] args) throws UnsupportedLookAndFeelException, ClassNotFoundException, InstantiationException, IllegalAccessException, IOException, FontFormatException {

        for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
            if ("Nimbus".equals(info.getName())) {
                UIManager.setLookAndFeel(info.getClassName());
                break;
            }
        }

        InputStream stream = ClassLoader.getSystemClassLoader().getResourceAsStream("Heebo.ttf");
        customFont = Font.createFont(Font.TRUETYPE_FONT, stream).deriveFont(40f);
        MainWindow mainWindow = new MainWindow();
    }
}