https://www.myziyuan.com/
- 郭大帅
- package panel;import java.awt.Color;import java.awt.Font;import java.awt.Graphics;import javax.swing.JPanel;import main.MainTank;public class TipPanel extends JPanel implements Runnable{/*** */private static final long serialVersionUID = 1L; //偶数打印,画面板int time=0;public void paintComponent(Graphics g){super.paint(g);g.fillRect(0, 0, MainTank.getWidthOfGame(), MainTank.getHeightOfGame());//绘制提示窗口if (time%2==0){//偶数打印,画面板,造成闪烁效果 g.setColor(Color.ORANGE); Font font=new Font("华文楷体",Font.BOLD,30); g.setFont(font);//选用字体 g.drawString("Ready", 140, 130); }}@Overridepublic void run() {while (true){try{Thread.sleep(250);}catch (Exception e){e.getMessage();}time++;//绘图开关this.repaint();}}}//TipPanel类似的,修改下就行
- 2021-03-23 20:00:01
- hz
- 这个就是星星网网址
- 2021-02-12 12:24:37
- 123qwe
- 开源代码网站都有哪些,www.oschina.netwww.lupaworld.comwww.phpchina.com
- 2021-02-12 12:24:37