Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÓÃ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);
 


Ïà¹ØÎĵµ£º

JAVAÏß³ÌÖ®Áù£ºÏ̵߳ÄÉúÃüÖÜÆÚ¼°ËÀËø

Ò»£¬Ï̵߳ÄËĸöÖ÷ÒªÖÜÆÚ״̬ÊÇ“´´½¨”£¬“¿ÉÖ´ÐД£¬“·Ç¿ÉÖ´ÐД£¬“ÏûÍö”£¬×´Ì¬×ª»»¹ØϵÈçÏÂͼ£º
£¨1£©´´½¨¡£µ±ÊµÀý»¯Ò»¸öthread¶ÔÏó²¢Ö´ÐÐstart()·½·¨ºó£¬Ï߳̽øÈë“¿ÉÖ´ÐД״̬¿ªÊ¼Ö´ÐС£ËäÈ»¶àÏ̸߳øÓû§Ò»ÖÖͬʱִÐеļÙÏ󣬵«ÊÂʵÉÏÔÚͬһʱ¼äµãÄÚ£¬Ö»ÓÐÒ»¸ö ......

ÀûÓÃJavaÉú³É¾²Ì¬HMTLÒ³ÃæµÄ·½·¨ÊÕ¼¯

2009Äê08ÔÂ12ÈÕ ÐÇÆÚÈý 10:31 A.M.
Éú³É¾²Ì¬Ò³Ãæ¼¼Êõ½â¾ö·½°¸Ö®Ò»
תÔØÕßÇ°ÑÔ£ºÕâÊÇÒ»¸öÈ«ÃæµÄjsp¶¯Ì¬Ò³Ã澲̬»¯·½°¸£¬±¾Õ¾µÄÌû×Ó¾²Ì¬»¯·½°¸½«½è¼øÕâƪÌû×ÓÖз½·¨¡£Ïòhttp://www.agilejava.orgµÄsingleµÄ¹²Ïí¾«ÉñÖ¾´¡£
תÌûÕýÎÄ£º
       ÏàÐźܶàÈ˶¼Ï£Íû×Ô¼ºµÄÒ³ÃæÔ½¿ìÔ½ºÃ£¬×îºÃÊ ......

ʲôÊÇjava¶ÔÏóµÄÇ¿¡¢Èí¡¢ÈõºÍÐéÒýÓÃ

±¾ÎĽéÉܶÔÏóµÄÇ¿¡¢Èí¡¢ÈõºÍÐéÒýÓõĸÅÄî¡¢Ó¦Óü°ÆäÔÚUMLÖеıíʾ¡£
1£®¶ÔÏóµÄÇ¿¡¢Èí¡¢ÈõºÍÐéÒýÓÃ
   ÔÚJDK 1.2ÒÔÇ°µÄ°æ±¾ÖУ¬ÈôÒ»¸ö¶ÔÏó²»±»ÈκαäÁ¿ÒýÓã¬ÄÇô³ÌÐò¾ÍÎÞ·¨ÔÙʹÓÃÕâ¸ö¶ÔÏó¡£Ò²¾ÍÊÇ˵£¬Ö»ÓжÔÏó´¦ÓÚ¿É´¥¼°£¨reachable£©×´Ì¬£¬³ÌÐò²ÅÄÜʹÓÃËü¡£´ÓJDK 1.2°æ±¾¿ªÊ¼£¬°Ñ¶ÔÏóµÄÒýÓ÷ÖΪ4ÖÖ¼¶±ð£¬´Ó¶øÊ ......

JavaÅàѵµÚÒ»ÌìºóµÄ¸ÐÏë

         ÔڲμÓJavaÅàѵµÚÒ»Ììºó£¬×Ô¼ººÜÓиÐÏ룬ԭÒòÆäʵҲºÜ¼òµ¥¡£±¾ÈËרҵÊÇÈí¼þ¹¤³Ì£¬ÏÖÔÚÒѾ­´óÈýÁË£¬ÎªÁË×Ô¼ºÒÔºó¸üºÃµÄ¾ÍÒµ£¬²Î¼ÓÁËÕâ¸öΪÆÚËĸöÔµÄJavaÅàѵ°à£¬µ«ÊÇÔÚÕâ¸öÈËÊýΪ60ÉÏϵİàÖУ¬Ö»ÓÐ5¸öÈËÊǼÆËã»úרҵµÄ£¨°üÀ¨±¾ÈË×Ô¼º£©¡£ÆäÓàµÄѧÉúÊÇÊýÀíϵµÄ¡£
  ......

java »ñÈ¡ÍøÒ³ÄÚÈÝ

package test;



import java.io.BufferedReader;

import java.io.IOException;

import java.io.InputStream;

import java.io.InputStreamReader;

import java.net.Authenticator;

import java.net.HttpURLConnection;

import java.net.PasswordAuthenticat ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ