1.ϵͳ?系统源码抽离???Դ??
ϵͳ????Դ??
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(, );
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();
}
});
}
}
2024-12-24 09:081075人浏览
2024-12-24 09:022414人浏览
2024-12-24 08:391664人浏览
2024-12-24 08:222799人浏览
2024-12-24 08:182987人浏览
2024-12-24 07:002933人浏览
藝人唐治平母親6月被發現陳屍在社區頂樓,但唐治平堅稱「那不是他媽媽」,更拒絕將遺體領回,不過檢方經過一個月調查,確認這具遺體就是唐治平母親。若唐治平未認領 預計土葬收埋避免爭議6月3號唐治平的母親被發
1.Android APK+Dex文件反编译及回编译工具使用说明2.如何反编译软件源码?3.dex是什么4.Android逆向笔记 —— DEX 文件格式解析5.dex是什么?6.jar2dexç