javaÖÐʹ´°¿Ú¾ÓÖÐÏÔʾ
Èç¹ûҪʹÖ÷´°¿Ú ¾ÓÖÐÒ»°ãʹÓÃÏÂÃæµÄ·½·¨£º
import javax.swing.*;
import java.awt.*;
public class ToCenter
{
public ToCenter(JFrame frame)
{
//---------------------------ÉèÖô°¿Ú¾ÓÖÐ----------------------------------------------------------
int windowWidth = frame.getWidth(); //»ñµÃ´°¿Ú¿í
int windowHeight = frame.getHeight(); //»ñµÃ´°¿Ú¸ß
Toolkit kit = Toolkit.getDefaultToolkit(); //¶¨Ò幤¾ß°ü
Dimension screenSize = kit.getScreenSize(); //»ñÈ¡ÆÁÄ»µÄ³ß´ç
int screenWidth = screenSize.width; //»ñÈ¡ÆÁÄ»µÄ¿í
int screenHeight = screenSize.height; //»ñÈ¡ÆÁÄ»µÄ¸ß
frame.setLocation(screenWidth/2-windowWidth/2, screenHeight/2-windowHeight/2);//ÉèÖô°¿Ú¾ÓÖÐÏÔʾ
//------------------------------------------------------------------------------------------------
}
}
µ±È»ÄãÒ²¿ÉÒÔÈÃÒ»¸öWindow¶ÔÏó¡¢JWindow¶ÔÏó»òFrame¶ÔÏó¾ÓÖУ¬ÒÔÏÂÊǸüͨÓõķ½·¨£º
Toolkit kit = Toolkit.getDefaultToolkit();&
Ïà¹ØÎĵµ£º
ÁùÖÖÒì³£´¦ÀíµÄªϰ
Äã¾õµÃ×Ô¼ºÊÇÒ»¸öJavaר¼ÒÂð£¿ÊÇ·ñ¿Ï¶¨×Ô¼ºÒѾȫÃæÕÆÎÕÁËJavaµÄÒì³£´¦Àí»úÖÆ£¿ÔÚÏÂÃæÕâ¶Î´úÂëÖУ¬ÄãÄܹ»Ñ¸ËÙÕÒ³öÒì³£´¦ÀíµÄÁù¸öÎÊÌâÂð£¿
Java´úÂë
OutputStreamWriter out = ...
java.sql.Connection conn =& ......
½¨Á¢½ÚµãÀà(Node.java)
package com.yz.mystack;
public class Node {
Object data;
Node next;
public Node(Object data){
this.data=data;
next=null;
}
public Object getData() {
return data;
}
public void setData(Object data) {
this.data = data;
}
public Node getNext() {
......
Ïֽ׶ÎJAVA²Ù×÷ExcelµÄJARÖ÷ÒªÓÐapache µÄ POI¼° JXL.
ÒòΪÏÖÔÚµÄeclipse²Ù×÷excelÓõIJå¼þΪjxl£¬ËùÒÔÔÚÏîÄ¿ÖоÍʹÓÃÁËjxl£®
ÏëÏëÁ½Õ߶¼²î²»ÁËÌ«¶à£®
´Ë¼òµ¥ÏµÁÐΪÁ½¸ö²¿·Ö£¬Ò»ÊÇAPIϵÁУ¨ÔÙ¹ÙÍøhttp://www.andykhan.com/jexcelapi/download.html¿ÉÒÔÖ±½ÓÏÂÔØ£©£¬
ÁíÒ»²¿·ÖÔòÊÇÓ¦ÓÃϵÁУ®
ÔÚÕâÀïÏÈÕÒÁ˸öÀý×Ó¸ø´ó¼Ò£ ......
ÊäÈëÒ»ÐÐÊý×Ö£¬Èç¹ûÎÒÃÇ°ÑÕâÐÐÊý×ÖÖеđ5’¶¼¿´³É¿Õ¸ñ£¬ÄÇô¾ÍµÃµ½Ò»ÐÐÓÿոñ·Ö¸îµÄÈô¸É·Ç¸ºÕûÊý£¨¿ÉÄÜÓÐЩÕûÊýÒÔ‘0’¿ªÍ·£¬ÕâЩͷ²¿µÄ‘0’Ó¦¸Ã±»ºöÂÔµô£¬³ý·ÇÕâ¸öÕûÊý¾ÍÊÇÓÉÈô¸É¸ö‘0’×é³ÉµÄ£¬ÕâʱÕâ¸öÕûÊý¾ÍÊÇ0£©¡£
ÄãµÄÈÎÎñÊÇ£º¶ÔÕâЩ·Ö¸îµÃµ½µÄÕûÊý£¬ÒÀ´ÓСµ½´óµÄ˳ÐòÅÅÐ ......
Java ÀíÂÛÓëʵ¼ù: Ãè»æḬ̈߳²È«ÐÔ
2007-12-15 00:10
——Ḭ̈߳²È«²»ÊÇÒ»¸ö·ÇÕæ¼´¼ÙµÄÃüÌâ
Brian Goetz (brian@quiotix.com), Ê×ϯ¹ËÎÊ, Quiotix Corp
2003 Äê 11 ÔÂ 15 ÈÕ
7Ô·ÝÎÒÃǵIJ¢·¢×¨¼Ò Brian Goetz ½« Hashtable ºÍ Vector ÀàÃèÊöΪ“ÓÐÌõ¼þḬ̈߳²È«µÄ”¡£Ò»¸öÀàÄѵÀ²»ÊÇḬ̈߳²È«¾ÍÊÇÏß³Ì ......