当前位置:首页 » 编程博文
开发技术指南» 文章正文
    引言: /*** @authorFOAS@bbs.xjtu.edu.cn
 

 

    摘要:项目迭代开发手记--文件分割存储用例的实现过程(3) 上午的迭代2完成后,我们获得了一个有完整压缩流功能的实现代码,这次迭代完成的代码是可用的,我们在迭代2中完成了我们既定的任务。在下午的小组讨论中,我们继续考虑下一阶段的迭代目标,由于没有决定图档文件的格式,我们决定先不考虑图片格式的问题,先实现文件的分割功能。文件的分割主要是考虑当图档文件太大的时,数据库提交性能会变得非常慢,分割的目的......
 ·j2me (java 2 micro edition) 简介    »显示摘要«
    摘要:j2me (java 2 micro edition) 简介  中国科大bbs   ■前言   如果您曾经到http://www.javasoft.com 网站上查询有关java 2 micro edition 的资料,十之八九会被一大堆的技术名词搞的一头雾水。什么kvm ,什么cldc 、cdc 、midp ,後面还冒出了personal java 、embedded java以及jes 等名词......


简易黑白棋--我的第一个程序

/**

 * @author foas@bbs.xjtu.edu.cn on oct.23,2004 12:00 【程序编程相关:山外看山 —— 评The Art of

【推荐阅读:Regsvr32 用法和错误消息的说明

 * 【扩展信息:免费网盘

 * todo to change the template for this generated type comment go to window -

 * preferences - java - code generation - code and comments

 */

 

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

public class first extends jframe {

    public first() {

       

        drawpane drawpane = new drawpane(getbackground());

        container pane = getcontentpane();

        pane.add(drawpane, borderlayout.center);

        setsize(600, 580);

        //f.setextendedstate(jframe.maximized_both);

        //f.setundecorated(true);

        //f.setalwaysontop(true);

        //f.setlocationbyplatform(true);

        setlocation(208, 104);

        setdefaultcloseoperation(jframe.exit_on_close);

        //setbackground(color.pink);

        setresizable(false);

        setvisible(true);

    }

    public static void main(string[] args) {

        new first();

    }

}

class drawpane extends jpanel {

    private insets insets;

    final static int black = -1;

    final static int white = 1;

    private point point = null;

    private int colorstatus;

    private int[][] status = null;

    private int count;

    private int chessnum;

    private jtextarea infotext = null;

    private int[][] statusw = null;

    private int level=1 ;

    private int whitecount=0;

    private int blackcount=0;

    private color bgcolor=null;

    public drawpane(color c) {

        initcomponent();

        initchess();

        bgcolor=c;

        addmouselistener(new mouseadapter() {

            public void mouseclicked(mouseevent e) {

                response(e.getpoint());

            }

        });

        setfocusable(true);

        addkeylistener(new mykeylistener());

    }

    public void paintcomponent(graphics g) {

        super.paintcomponent(g);

        if (insets == null) {

            insets = getinsets();

        }

        //super.paintcomponents(g);

        graphics2d g2d = (graphics2d) g;

        g2d.setcolor(color.orange);

        g2d.fill3drect(50, 50, 400, 400, true);

        g2d.setcolor(color.red);

        for (int i = 0; i < 8; i++) {

            for (int j = 0; j < 8; j++) {

                g2d.drawstring(i + "", 50 * i + 75, 45);

                g2d.drawstring(j + "", 40, 50 * j + 75);

                g2d.drawrect(50 + 50 * i, 50 + 50 * j, 50, 50);

                if (status[i][j] == black) {

                    g2d.setcolor(color.black);

                    g2d.filloval(i * 50 + 53, j * 50 + 53, 44, 44);

                }

                if (status[i][j] == white) {

                    g2d.setcolor(color.white);

                    g2d.filloval(i * 50 + 53, j * 50 + 53, 44, 44);

                }

                if (status[i][j] > 1) {

                    //                    g2d.setcolor(color.blue);

                    //                                        g2d.drawstring("" + (status[i][j] - 1), i * 50 + 75,

                    //                                                j * 50 + 75);

                    g2d.drawstring("x", i * 50 + 75, j * 50 + 75);

                }

                g2d.setcolor(color.black);

                g2d.filloval(200, 470, 30, 30);

                g2d.setcolor(color.white);

                g2d.filloval(300, 470, 30, 30);

                g2d.setcolor(bgcolor);

                g2d.fillrect(240, 470, 60, 30);

                g2d.fillrect(340, 470, 60, 30);

                g2d.setcolor(color.red);

                g2d.drawstring("" + blackcount, 240, 490);

                g2d.drawstring("" + whitecount, 340, 490);

            }

        }

        //jug(colorstatus);

    }

    public void initcomponent() {       

        infotext = new jtextarea();       


...   下一页
    摘要:近日,国内的腾讯qq、神州数码、江民公司、某门户网站、xxx游戏娱乐有限公司、一家著名电子商务网站陆续被黑客攻陷或入侵。在黑色恐怖的弥漫下,国内互联网一时人心惶惶,风声鹤唳。  10月17日,在接到一位顶尖黑客高手方圣(化名)的报料后,本报记者深入了解事件内幕。在调查过程中记者震惊地发现:其中一些被黑网站还受到了黑客的巨额敲诈勒索,这是国内首起网络黑客勒索事件,且组织严密、技术高超、规模巨大。  ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE