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

📄 borderdecorator.java

📁 A Java virtual machine instruction consists of an opcode specifying the operation to be performed, f
💻 JAVA
字号:
import java.awt.*;
import java.awt.event.*;

//swing classes
import com.sun.java.swing.text.*;
import com.sun.java.swing.*;
import com.sun.java.swing.event.*;
import com.sun.java.swing.border.*;

public class SlashDecorator extends Decorator
{
   int x1, y1, w1, h1;

   public SlashDecorator(JComponent c)
   {
      super(c);
   }
   public void setBounds(int x, int y, int w, int h)
   {
      x1 = x; y1= y;
      w1 = w; h1 = h;
      super.setBounds(x, y, w, h);
   }
   public void paint(Graphics g)
   {
      super.paint(g);
      g.setColor(Color.red);
      g.drawLine(0, 0, w1, h1);
   }

}

⌨️ 快捷键说明

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