?? tjlist.java
字號:
/**
*##############################################################################
*
* [ 項目名 ] :
* [ 公司名 ] : SunshineSOFT
* [ 模塊名 ] : 帶監聽的JList列表框
* [ 文件名 ] : TJList.java
* [ 相關文件 ] :
* [ 文件實現功能] : 帶監聽的文本區域
* [ 作者 ] : 顧俊
* [ 版本 ] : 1.0
* ----------------------------------------------------------------------------
* [ 備注 ] :
* ----------------------------------------------------------------------------
* [ 修改記錄 ] :
*
* [ 日 期 ] [版本] [修改人] [修改內容]
* 2006/04/25 1.0 顧俊 創建
* ##--------------------------------------------------------------------------
* 版權所有(c) 2006-2007, SunshineSOFT Corporation
* --------------------------------------------------------------------------##
*
* [ 函數說明 ] :
*
* [## public TJList() {} ]:
* 功能: 構造函數
*
* [ 遺留問題 ] :
*
*##############################################################################
*/
package com.sunshine.sunsdk.swing;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class TJList
extends JList
implements MouseListener {
public TJList() {
//設置顯示的行數
this.setVisibleRowCount(5);
//設置前景色和后景色
this.setForeground(new Color(141, 131, 106));
this.setBackground(new Color(244, 238, 227));
//加鼠標監聽
this.addMouseListener(this);
}
/**=======================================================================**
* MouseListener 監聽
**=======================================================================**
*/
public void mouseClicked (MouseEvent me) {
}
public void mousePressed (MouseEvent me) {
}
public void mouseReleased(MouseEvent me) {
}
public void mouseEntered (MouseEvent me) {
this.setForeground(new Color( 87, 87, 47));
this.setBackground(new Color(248, 242, 230));
}
public void mouseExited (MouseEvent me) {
this.setForeground(new Color(141, 131, 106));
this.setBackground(new Color(244, 238, 227));
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -