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

📄 labeltexttest.java

📁 codebook!
💻 JAVA
字号:
import com.darwinsys.util.LabelText;import java.awt.*;import javax.swing.*;/** Test program for LabelText class. * STATUS: NOT WORKING!! * @author	Ian Darwin, ian@darwinsys.com * @version $Id: LabelTextTest.java,v 1.1 2002/01/29 15:56:39 ian Exp $ */public class LabelTextTest extends JComponent {	/** "main program" method - construct and show */	public static void main(String[] av) {		JFrame f = new JFrame("LabelTextTest");		f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);		LabelTextTest comp = new LabelTextTest();		comp.setBackground(Color.yellow);		Container cp = f.getContentPane();		cp.setLayout(new FlowLayout());		cp.add(comp);		f.pack();		f.setLocation(200, 200);		f.setVisible(true);	}	/** Construct the object including its GUI */	public LabelTextTest() {		super();		JComponent foo;		add(foo = new LabelText("Hello, and welcome to the world of Java"));		foo.setFont(new Font("helvetica", Font.BOLD, 24));		add(foo = new LabelText("Exit")); 		foo.setForeground(Color.red);	}}

⌨️ 快捷键说明

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