I am a beginner in Java and learning Java Swing.The text of the button when at runtime appears unreadable, as shown in the image https://i.stack.imgur.com/ihlQn.jpg . I have tried changing the font by the following lines of code. I worked on Windows 10 64-bit OS.
import javax.swing.*;
import java.awt.*;
public class Button1 {
    public static void main(String[] args) {
        Button1 gui = new Button1();
        gui.go();
    }
    public void go(){
        JFrame frame = new JFrame();
        JButton east = new JButton(" East");
        JButton west = new JButton(" West");
        JButton north = new JButton(" North");
        JButton south = new JButton(" South");
        JButton center = new JButton(" Center");
        frame.getContentPane(). add( BorderLayout.EAST, east);
        frame.getContentPane(). add( BorderLayout.WEST, west);
        frame.getContentPane(). add( BorderLayout.NORTH, north);
        frame.getContentPane(). add( BorderLayout.SOUTH, south);
        frame.getContentPane(). add( BorderLayout.CENTER, center);
        Font bigFont = new Font("serif", Font.BOLD , 10);
        east.setFont(bigFont);
        west.setFont(bigFont);
        north.setFont(bigFont);
        south.setFont(bigFont);
        center.setFont(bigFont);
        frame.setSize(300,300);
        frame.setVisible(true);
    }
}

 
     
    