panelbas_charge.java

来自「这是一个在linux环境下」· Java 代码 · 共 32 行

JAVA
32
字号
package fr.umlv.projet.fenetre.preformance;

import java.awt.Graphics;
import java.awt.Graphics2D;

import javax.swing.JPanel;
/**
 * The Panel "Charge dediee" in the Panel 
 * {@link fr.umlv.projet.fenetre.preformance.PanelBas PanelBas}(the pane of stat).
 * @author HUANG Wei & MA Xiao Jun
 *
 */
public class PanelBas_Charge extends JPanel {
	private String Charge = "";
	private int h = 0;
	protected@Override void paintComponent(Graphics graphic){
		Graphics2D g = (Graphics2D)graphic; 
		super.paintComponent(g);
		h = this.getHeight();
		g.drawString("Charge dediee : "+Charge,5,h-2);
	}

	/**
	 * to refresh the Panel "Charge"
	 * @param Charge the value of "Charge dediee".
	 */
	public void refresh(String Charge){
		this.Charge = Charge;
	}

}

⌨️ 快捷键说明

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