how to change font size of JOptionPane

前端 未结 2 1359
余生分开走
余生分开走 2021-01-25 19:53
import java.awt.ComponentOrientation;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing         


        
2条回答
  •  萌比男神i
    2021-01-25 20:41

    One of the easiest ways is to use HTML directly in the String literal. For example:

    "MINES AND GEOSCIENCES BUREAU - REGION XI, DAVAO CITY\n"

    Can easily become:

    "MINES AND GEOSCIENCES BUREAU - REGION XI, DAVAO CITY"

    Note that when you use HTML, you can no longer use \n for new lines. Use
    instead.

提交回复
热议问题