1.���� app Դ��
���� app Դ��
import java.awt.*;/
*** @author Hardneedl
*/
interface Brush {
void doPaint(Graphics g);
}
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
/
*** @author Hardneedl
*/
final class StringPaintDemo extends JFrame {
public String getTitle() { return "String Paint";}
static private final Dimension size = new Dimension(,画板跑腿php源码 );
public Dimension getPreferredSize() { return size;}
public Dimension getMaximumSize() { return size;}
public Dimension getMinimumSize() { return size;}
public Dimension getSize() { return size;}
private String s;
private Brush stringBrush = new Brush() {
public void doPaint(Graphics g) {
Graphics gg = g.create();
gg.setColor(Color.RED);
gg.drawString(s == null ? "null" : s , , );
gg.dispose();
}
};
private JTextField txtField;
private JComponent canvas = new JComponent(){
protected void paintComponent(Graphics g) {
super.paintComponent(g);
stringBrush.doPaint(g);
}
};
private StringPaintDemo() throws HeadlessException {
init();
attachListeners();
doLay();
}
private void init() {
txtField = new JTextField();
}
private void attachListeners() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
txtField.getDocument().addDocumentListener(new DocumentListener(){
private void update(){
s = txtField.getText();
canvas.paintImmediately(canvas.getBounds());
}
public void changedUpdate(DocumentEvent e) { update();}
public void insertUpdate(DocumentEvent e) { update();}
public void removeUpdate(DocumentEvent e) { update();}
});
}
private void doLay() {
Container container = getContentPane();
container.add(txtField,BorderLayout.NORTH);
container.add(canvas, BorderLayout.CENTER);
pack();
setVisible(true);
}
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
new StringPaintDemo();
}
});
}
}
2025-01-24 14:122120人浏览
2025-01-24 13:281832人浏览
2025-01-24 13:031400人浏览
2025-01-24 12:501875人浏览
2025-01-24 12:151973人浏览
2025-01-24 11:502690人浏览
中国消费者报杭州讯记者施本允)为进一步加强校园食品安全监管、严守食品安全底线,积极营造全社会关心关注关爱广大师生饮食安全和身体健康的良好氛围,浙江省杭州市在日前统一开展开学季“你点我检”进校园主题活动
1.现货电子盘刷单员是干什么的现货电子盘刷单员是干什么的 如果你是看到别人公司这样招聘呢,那就是找客户的一种方式了。如果专门想问这个呢,他是通过短线交易来赚取利润的方式之一,基本属于赚取手续费。飞
1.【筹码单峰密集+黑马1号】通达信主+副指标潜伏抓涨停选股公式--判断买卖点2.通达信“筹码单峰密集”主图指标选股公式--判断买卖点3.筹码单峰密集选股公式4.筹码峰中下部的公式中90%小于10%。