ÓÃJavaдµÄͼƬä¯ÀÀÆ÷
ÓÃJavaдµÄͼƬä¯ÀÀÆ÷
package com.wenbo.myprogrem.day16;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public class MyPicture implements ActionListener{
CardLayout cl=new CardLayout();
JPanel jp1=new JPanel();
Timer timer=new Timer(2000,this);//ÉèÖÃtimerÑÓ³Ùʱ¼ä£¬×¢²á¼àÌýÆ÷
public MyPicture(){
timer.setActionCommand("ÏÂÒ»ÕÅ");
JFrame jf=new JFrame("ͼƬä¯ÀÀ´°¿Ú");
jp1.setLayout(cl);
JPanel jp2=new JPanel();
for(int i=0;i<30;i++){
Icon ic=new ImageIcon("C:/Documents and Settings/Administrator/×ÀÃæ/tupian/tu"+(i+1)+".gif");
JLabel jl=new JLabel(ic);
jp1.add(jl,(i+1)+"");
}
jf.add(jp1);
String [] st={"PLAY","µÚÒ»ÕÅ","ÏÂÒ»ÕÅ","ÉÏÒ»ÕÅ","×îºóÒ»ÕÅ","STOP"};
for(int i=0;i<st.length;i++){
JButton jb=new JButton(st[i]);
jb.addActionListener(this);
jp2.add(jb);
}
jf.add(jp2,BorderLayout.SOUTH);
jf.setSize(520,500);//ÉèÖô°¿Ú´óС
jf.setLocation(300, 400);//ÉèÖóöÏÖÔÚÆÁÄ»µÄλÖÃ
jf.setVisible(true);//ÉèÖÿɼû
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//µãX¹Ø±Õ
}
public static void main(String[] args) {
new MyPicture();
}
public void actionPerformed(ActionEvent e) {
String comm=e.getActionCommand();
if("µÚÒ»ÕÅ".equals(comm)){
cl.first(jp1);
}else if("ÏÂÒ»ÕÅ".equals(comm)){
cl.next(jp1);
}else if("ÉÏÒ»ÕÅ".equals(comm)){
cl.previous(jp1);
Ïà¹ØÎĵµ£º
ÌâÄ¿£ºÓÐ600¸öÆ»¹û£¬ÒªÇó·Ö×°ÔÚ10¸öºÐ×ÓÖС£¶ÔÓڹ˿ÍÒªÇóµÄÈÎÒâÆ»¹ûÊý¶¼¿ÉÒÔͨ¹ý´Ë10¸öºÐ×Ó½øÐÐ×éºÏµÃµ½¡£
·ÖÎö£º1¡¢Ê×ÏÈÒªÉè¼Æ10¸öºÐ×ÓËù×°Æ»¹ûµÄÊýÄ¿¡£Óɶþ½øÖÆÓëÊ®½øÖƵÄת»»¿ÉÖª£¬2µÄ±¶ÊýÏà¼Ó¿ÉÒԵĵ½Ò»ÇÐÊ®½øÖÆÊý¡£ËùÒÔÈç¹ûÏëʹÓÃÓÐÏÞµÄÊý×Ö×éºÏµÃµ½Ò»¶¨·¶Î§ÄÚµÄËùÓÐÊý×Ö±ØÊÇÒÔ2µÄ±¶Êý½øÐÐÉè¼ÆµÄ¡£ËùÒÔ£¬¿É֪ʮ¸öºÐ×Ó ......
O/R Mapping ÊÇ Object Relational Mapping£¨¶ÔÏó¹ØÏµÓ³É䣩µÄËõд¡£Í¨Ë׵㽲£¬¾ÍÊǽ«¶ÔÏóÓë¹ØÏµÊý¾Ý¿â°ó¶¨£¬ÓöÔÏóÀ´±íʾ¹ØÏµÊý¾Ý¡£ÔÚO/R MappingµÄÊÀ½çÀÓÐÁ½¸ö»ù±¾µÄÒ²ÊÇÖØÒªµÄ¶«¶«ÐèÒªÁ˽⣬¼´VO£¬PO¡£
¡¡¡¡VO£¬Öµ¶ÔÏó(Value Object)£¬PO£¬³Ö¾Ã¶ÔÏó(Persisent Object)£¬ËüÃÇÊÇÓÉÒ»×éÊôÐÔºÍÊôÐÔµÄgetºÍset·½·¨×é³É¡£´ ......
package com.color.program;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
public class CompareTime {
public static void main(String[] args){
String t1 = "2008-05-09";
String t2 = "20 ......
Eclipse ³£Óòå¼þµÄ°²×°
1£©Download plugin package
2) Exit Eclipse App
3) Unzip the plugin and copy it to ..\Eclipse\plugins
4) Restart Eclipse App
J2EE µÄ¿ªÔ´Æ½Ì¨
Eclipse+Tomcat+Lombez+MyEclipse
MyEclipse: MyEclipseEnterpriseWorkbeachInstall , °²×°µ½Ä¿Â¼Eclipse ϲſÉÒÔÕý³£Ê¹Óá£
Servlet ......