📄 printingslider.java
字号:
// Figure 8.43import javax.swing.event.ChangeEvent;public class PrintingSlider extends EventSlider { /** post: this slider object is constructed * and the orientation is horizontal * and getMaximum() == max * and getMinimum() == min * and getValue() == val */ public PrintingSlider(int min, int max, int val) { super(HORIZONTAL, min, max, val); } /** post: getValue() is output */ public void stateChanged(ChangeEvent e) { System.out.println( getValue() ); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -