Java Swing LayoutManager
BorderLayout
FlowLayout
GridLayout
GridBagLayout
CardLayout
BoxLayout
< type="text/javascript">
document.body.oncopy = function() {
if (window.clipboardData) {
setTimeout(function() {
var text = clipboardData.getData("text");
if (text && text.length > 300) {
text = text + "\r\n\n±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£º" + location.href;
clipboardData.setData("text", text);
}
}, 100);
}
}
BorderLayout
FlowLayout
GridLayout
GridBagLayout
CardLayout
BoxLayout
1.BorderLayout
java.lang.Object
--java.awt.BorderLayout
½«°æÃæ»®·Ö³É¶«¡¢Î÷¡¢ÄÏ¡¢±±¡¢ÖÐÎå¸öÇøÓò£¬½«Ìí¼ÓµÄ×é¼þ°´Ö¸¶¨Î»Ö÷ÅÖá£
BorderLayout.EAST
BorderLayout.WEST
BorderLayout.SOUTH
BorderLayout.NORTH
BorderLayout.CENTER
¹¹Ô캯Êý£º
BorderLayout()
½¨Á¢×é¼þ¼äÎÞ¼ä¾àµÄBorderLayout
BorderLayout(int hgap,int vgap)
½¨Á¢×é¼þ¼äˮƽ¼ä¾àΪhgap,´¹Ö±¼ä¾àΪvgapµÄBorderLayout
ÀýÒ»£º
view plain
copy to clipboard
print
?
import
java.awt.BorderLayout;
import
javax.swing.JFrame;
import
javax.swing.JButton;
/**
*
* @author Chel
*/
public
class
BorderLayoutDemo {
public
static
void
main(String[] args) {
//½¨Á¢Ò»¸öJFrame,JFrameµÄĬÈÏLayoutManagerΪB
Ïà¹ØÎĵµ£º
Èç¹ûÄãÔø¾ÓùýPerl»òÈÎºÎÆäËûÄÚ½¨ÕýÔò±í´ïʽ֧³ÖµÄÓïÑÔ£¬ÄãÒ»¶¨ÖªµÀÓÃÕýÔò±í´ïʽ´¦ÀíÎı¾ºÍÆ¥ÅäģʽÊǶàô¼òµ¥¡£Èç¹ûÄã²»ÊìϤÕâ¸öÊõÓÄÇô“ÕýÔò±í´ïʽ”£¨Regular Expression£©¾ÍÊÇÒ»¸ö×Ö·û¹¹³ÉµÄ´®£¬Ëü¶¨ÒåÁËÒ»¸öÓÃÀ´ËÑË÷Æ¥Åä×Ö·û´®µÄģʽ¡£
Ðí¶àÓïÑÔ£¬°üÀ¨Perl¡¢PHP¡¢Python¡¢JavaScriptºÍJScript£¬¶¼Ö§ ......
Object Ordering
A List l may be sorted as follows.
Collections.sort(l);
If the List consists of String elements, it will be sorted into alphabetical order. If it consists of Date elements, it will be sorted into chronological order. How does this happen? String and Date both implement the Compara ......
/**
* InvokeTester.java
* °æÈ¨ËùÓÐ(C) 2010 cuiran2001@163.com
* ´´½¨:´ÞȽ 2010-2-9 ÏÂÎç02:07:13
*/
package com.timer.demo.objectsocket;
import java.lang.reflect.Method;
/**
* @author ´ÞȽ
*
*/
public class InvokeTester {
public int add(int param1, int param2) {
return param ......
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
im ......
ÕâÆª½Ì³Ì¸üÐÂÓÚ2008ÄêÏÄÌ죬ÓÃÀ´¼¯³ÉSWTºÍXULRunnerÀ´ÔÚSWTÀïÏÔʾһ¸öä¯ÀÀÆ÷¡£ÒªÏë»ñµÃ¸ü¶àÐÅÏ¢£¬Çë²Î¿¼
http://www.eclipse.org/swt/faq.php#whatisbrowser
1£¬¼ò½é
ÕâÆª½Ì³ÌÓÐÁ½¸öÄ¿µÄ¡£Ê×ÏÈ£¬ÎÒÃÇÄÜѧµ½Ò»Ð©XPCOMµÄ¸ÅÄîºÍÔõôͨ¹ýJavaXPCOMÀ´ÔÚjavaÀïʹÓÃËü¡£Æä´Î£¬ÎÒÃÇѧµ½Ôõà ......