⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch9_57.java

📁 60多个javaSwing范例
💻 JAVA
字号:
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;

public class ch9_57 extends JFrame
{
	public ch9_57()
	{
		super("菜单演示");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(20,20,500,300);
		
	}
	public static void main(String [] args)
	{
		ch9_57 f=new ch9_57();
		
		f.getContentPane().setLayout(null);
		
		JTextArea jt1=new JTextArea("中国人名");
		jt1.setBounds(20,20,150,50);
		jt1.setFont(new Font("隶书",Font.PLAIN,14));
		jt1.setForeground(Color.red);
		
		JTextArea jt2=new JTextArea("中国人名");
		jt2.setBounds(20,80,150,50);
		jt2.setFont(new Font("华文行楷",Font.BOLD+Font.ITALIC,24));
		jt2.setForeground(Color.blue);
		
		JTextArea jt3=new JTextArea("中国人名");
		jt3.setBounds(20,150,150,50);
		jt3.setFont(new Font("黑体",Font.PLAIN+Font.ITALIC,34));
		jt3.setForeground(Color.cyan);
		
		JTextArea jt4=new JTextArea("中国人名");
		jt4.setBounds(20,230,150,50);
		jt4.setFont(new Font("宋体",Font.PLAIN,44));
		
		Color myColor=new Color(102,150,220);
		jt4.setForeground(myColor);
		
		f.getContentPane().add(jt1);
		f.getContentPane().add(jt2);
		f.getContentPane().add(jt3);
		f.getContentPane().add(jt4);
		
		
		f.setVisible(true);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -