<pre id="bbfd9"><del id="bbfd9"><dfn id="bbfd9"></dfn></del></pre>

          <ruby id="bbfd9"></ruby><p id="bbfd9"><mark id="bbfd9"></mark></p>

          <p id="bbfd9"></p>

          <p id="bbfd9"><cite id="bbfd9"></cite></p>

            <th id="bbfd9"><form id="bbfd9"><dl id="bbfd9"></dl></form></th>

            <p id="bbfd9"><cite id="bbfd9"></cite></p><p id="bbfd9"></p>
            <p id="bbfd9"><cite id="bbfd9"><progress id="bbfd9"></progress></cite></p>
            網頁設計

            如何設置html字體

            時間:2024-12-11 08:00:30 網頁設計 我要投稿
            • 相關推薦

            如何設置html字體

              HTML“超文本”就是指頁面內可以包含圖片、鏈接,甚至音樂、程序等非文字元素。那么,html字體怎么設置?下面百分網小編帶大家一起來看看詳細內容,希望對大家有所幫助!

              如何設置html字體

              設置字體

              html

              body

              A heading

              A paragraph

              /body

              /html

              設置文字尺寸

              html

              body

              A heading

              A paragraph

              /body

              /html

              設置字體顏色

              html

              body

              A heading

              A paragraph

              /body

              /html

              設置文字的字體、字體尺寸、字體顏色

              html

              body

              hello world

              /body

              /html

              如何設置Java對話框字體

              兩種辦法可以解決:

              一、使用簡單的HTML語法可以控制文字的大小:

              二、(推薦!)先看參數

              JOptionPane.showMessageDialog(Component, Object, String, int);第二個參數為Object,我們可以用一個JLabel來替代以前的String,給JLabel一個Font就OK了。

              import javax.swing.*;

              import java.awt.*;

              import java.awt.event.*;

              import java.awt.event.ActionEvent;

              public class Test {

              JFrame frame;

              JButton button;

              Font font;

              public Test(){

              font = new Font("宋體",0,12);

              UIManager.put("Button.font",font);

              UIManager.put("Label.font",font);

              frame = new JFrame("Test");

              button = new JButton("彈出");

              button.addActionListener(new ActionListener() {

              public void actionPerformed(ActionEvent actionEvent) {

              JLabel l = new JLabel("用戶名或密碼錯誤 請重新輸入");

              JOptionPane.showMessageDialog(frame,l,"錯誤",JOptionPane.ERROR_MESSAGE);

              }

              });

              frame.getContentPane().add(button);

              frame.setSize(300, 200);

              frame.setVisible(true);

              }

              public static void main(String[] args) {

              new Test();

              }

              }

            【如何設置html字體】相關文章:

            Photoshop如何設置字體09-20

            HTML5字體設置的方法06-02

            eclipse如何設置字體大小09-12

            如何設置Java對話框字體09-26

            IE瀏覽器如何設置字體大小11-01

            如何設置windows 7操作系統的字體圖解09-15

            word字體底紋顏色怎么設置09-19

            網頁中的字體的設置問題分析06-09

            word的字體底紋顏色怎么設置08-26

                    <pre id="bbfd9"><del id="bbfd9"><dfn id="bbfd9"></dfn></del></pre>

                    <ruby id="bbfd9"></ruby><p id="bbfd9"><mark id="bbfd9"></mark></p>

                    <p id="bbfd9"></p>

                    <p id="bbfd9"><cite id="bbfd9"></cite></p>

                      <th id="bbfd9"><form id="bbfd9"><dl id="bbfd9"></dl></form></th>

                      <p id="bbfd9"><cite id="bbfd9"></cite></p><p id="bbfd9"></p>
                      <p id="bbfd9"><cite id="bbfd9"><progress id="bbfd9"></progress></cite></p>
                      飘沙影院