userbutton.java

来自「PIY(Program It Yourself)是一个基于Java的应用程序开发」· Java 代码 · 共 27 行

JAVA
27
字号
package piy.usercomponent;

import java.awt.*;
import javax.swing.JButton;
import piy.UserComponent;

/**
* A button object which the user can add to their windows.  Properties include
* the text on the button.
* @author David Vivash
* @version 1.0, 20/11/00
*/
public class UserButton extends JButton implements UserComponent
{
	public UserButton() {
		setText("Button");
	}

	public String getText() { return super.getText(); }

	public void setText(String text) { super.setText(text); }

	public Color getBackground() { return super.getBackground(); }
	
	public void setBackground(Color c) { super.setBackground(c); }

}

⌨️ 快捷键说明

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