我是黑莓開發的新手。我試圖把文本放在按鈕上,但它根本不工作。應該有一個簡單的解決方案,但我無法找到它。這裏的代碼即時通訊使用如何在buttonField上顯示文本標籤黑莓
public class ProgramListView extends VerticalFieldManager{
private int _height;
private int _xPos;
private ButtonField evaluateButton;
//height is used to define each item height
//xPos is used to define each items position on screen
public ProgramListView(int height, int xPos){
this._height = height;
this._xPos = xPos;
evaluateButton = new ButtonField("Evaluate", ButtonField.CONSUME_CLICK){
//put methods in here to change the button's position
};
super.add(evaluateButton);
}
在此先感謝。
我想方法你有覆蓋佈局和油漆導致問題顯示你的按鈕文本PLZ刪除這些重寫的功能,並讓我knw它工作與否?謝謝 – SALMAN 2012-07-14 09:56:58
如果您只是要調用同一方法的超類版本,而無需修改參數或任何其他工作,則沒有必要重寫方法(例如'layout()'和'paint()')。看到一個[Java方法在這裏覆蓋教程](http://www.tutorialspoint.com/java/java_overriding.htm) – Nate 2012-07-14 10:48:48
我已經刪除了方法,但仍然沒有標籤。這些方法將被用於後來把按鈕放在正確的地方 – madcoderz 2012-07-14 10:51:47