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

📄 stripeborder.java

📁 Java样例程序集合:2D
💻 JAVA
字号:
import javax.swing.border.Border;import java.awt.Color;import java.awt.Component;import java.awt.Graphics;import java.awt.Insets;/* StripeBorder is used by XMarksTheSpot. */public class StripeBorder implements Border {    private static final int HEIGHT = 15;            public void paintBorder(Component c, Graphics g,                            int x, int y,                            int width, int height) {        g.setColor(Color.RED);                g.fillRect(x, y, c.getWidth(), HEIGHT);    }        public Insets getBorderInsets(Component c) {        return new Insets(HEIGHT, 0, 0, 0);    }        public boolean isBorderOpaque() {        return true;    }}

⌨️ 快捷键说明

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