?? inputvaluebean.java~4~
字號(hào):
package calculatebean;import java.awt.*;import javax.swing.JTextField;/** * 這個(gè)Bean是用來獲取輸入的x和y的值,并且返回這兩個(gè)值 */public class inputValueBean extends JTextField{ BorderLayout borderLayout1 = new BorderLayout(); private int inputValue_X; private int inputValue_Y; public inputValueBean() { try { jbInit(); } catch(Exception ex) { ex.printStackTrace(); } } private void jbInit() throws Exception { this.setLayout(borderLayout1); } public void setInputValue_X(int inputValue_X) { /* 關(guān)于x值的設(shè)置器實(shí)現(xiàn)方法 */ this.inputValue_X = "你所輸入的x的值為:" + inputValue_X; } public int getInputValue_X() { /* 關(guān)于x值的獲取器實(shí)現(xiàn)方法 */ return inputValue_X; } public void setInputValue_Y(int inputValue_Y) { /* 關(guān)于y值的設(shè)置器實(shí)現(xiàn)方法 */ this.inputValue_Y = "你所輸入的y的值為:" + inputValue_Y; } public int getInputValue_Y() { /* 關(guān)于y值的返回器實(shí)現(xiàn)方法 */ return inputValue_Y; }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -