52ky 发表于 2022-9-23 10:54:37

java 设计模式(续)

续之前上传的这计模式,这次是联系纯code
代码片段如下:
importjavax.swing.
;
publicclassTest{
publicstaticvoidmain(Stringargs){
JFrameframe=newJFrame(quot<imgsrc="static/image/smiley/default/titter.gif"smilieid="9"border="0"alt=""/>roxytestclient);
JLabellabel=newJLabel(Loadingwebpage......);
frame.getContentPane().add(label);
PageProxypageProxy=newPageProxy();
frame.getContentPane().add(pageProxy);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(400,300);
//frame.pack();
frame.setVisible(true);
pageProxy.label.setText(aaa);
}
}

(Continue the pattern uploaded before, this time contact pure code
The code snippet is as follows:
importjavax.swing.
;
publicclassTest{
publicstaticvoidmain(Stringargs){
JFrameframe=newJFrame(quot<imgsrc="static/image/smiley/default/titter.gif"smilieid="9"border="0"alt=""/>roxytestclient);
JLabellabel=newJLabel(Loadingwebpage...);
frame.getContentPane().add(label);
PageProxypageProxy=newPageProxy();
frame.getContentPane().add(pageProxy);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(400,300);
//frame.pack();
frame.setVisible(true);
pageProxy.label.setText(aaa);
}
})




页: [1]
查看完整版本: java 设计模式(续)