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
Ïà¹ØÎĵµ£º
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 ......
package test;
public class TestFactory<T> {
private Class <T> cls;
public String testabc="";
pub ......
Ò»¡¢java.util.Formatter
java.util.Formatter ÊÇJDK1.5ÐÂÔöµÄÀà¿â£¬¹¦ÄܺÜÇ¿´ó£¬µ«ÊDz»ºÃÕÆÎÕ£¬¾ÍÏñÏÂÆåÒ»Ñù£¬ÖªµÀÈçºÎ×߯å×Ó£¬ºÍÊìÁ·Ó¦ÓÃÍêÈ«ÊÇÁ½ÂëÊ¡£
¸ñʽ»¯Ö÷ÒªÓÃÔÚÎı¾Êä³ö·½Ã棬±ÈÈ磬Êý×Ö¡¢ÈÕÆÚ¡¢½ð¶îµÈ£¬»¹ÓÐÀàËÆ³¬ÊеĹºÎﵥСƱµÈµÈ£¬¶¼»áÓõ½¸ñʽ»¯Êä³öµÄ¹¤¾ß¡£ÔÚ´ËÀàû³öÏÖ֮ǰ£¬Ö»ÄÜͨ¹ý¿ ......
6 ¼ÓÔØÒ³ÃæµÄW3C DOM·ÃÎÊ
6.1 mozdom4java¿â
·ÃÎÊW3C DOMÊ÷±È·ÃÎÊMozillaµÄDOMÊ÷ÒªºÃ£¬ÒòΪËüÊÇÒ»¸ö¶¯Ì¬·ÃÎÊHTMLºÍXMLµÄDOMÊ÷µÄ±ê×¼¡£ÎªÁËʵÏÖÕâ¸ö£¬ÎÒÃÇʹÓôÓMozilla
DOMµ½W3C DOMµÄjava Bridge¡£ÓÐÒ»¸ö½Ð×ömozdom4javaµÄÏîÄ¿http://mozdom4java.mozdev.org/index.html¡£
ÏÂÔØÕâ¸ö°üºó£¬ÎÒÃǰÑjar°ü·Å ......
7.3 µã»÷ElementºÍÌîд±íµ¥
ÎÒÃÇ¿ÉÒÔ°²È«µÄ¼ÓÔØÒ³Ãæ£¬³éÈ¡ÐÅÏ¢£¬µ«ÊÇÓÐʱä¯ÀÀÍøÒ³ÊÇÐèÒªÌîд±íµ¥²¢Ìá½»»òÕßµã»÷ij¸öÔªËØÀ´´¥·¢onclickÒÔ±ãÖ´ÐÐÒ»¶Î
JavaScript´úÂë¡£
àÅ£¬ÒªÏëµã»÷Ò»¸öelementÐèÒª»ñµÃÕâ¸öelement(Ç°ÃæµÄxpathNodesÒ²Ðí¿ÉÒÔ°ïÎÒÃÇ×öµ½Õâµã)£¬Èç¹ûÊÇinput element£ ......