java UIManager
UIManager.setLookAndFeel(“
com.sun.java.swing.plaf.windows.WindowsLookAndFeel
”);//windowsĬÈÏ
UIManager.put("MenuBar.font", font);//¸ø¿Ø¼þÉèÖÃ×ÖÌå
static Object
put
(Object
key, Object
value)
public static void setLookAndFeel(String className, java.awt.Component c) {
try {
UIManager.setLookAndFeel(className);
SwingUtilities.updateComponentTreeUI(c);//×¢ÒâÕâÐÐ
}
catch (Exception ex) {
ex.printStackTrace();
JOptionPane.showMessageDialog(null,
"²»ºÃÒâ˼,setLookAndFeelʱ³ö´íÁË:( Errormsg:" + ex,
"setLookAndFeel",
JOptionPane.INFORMATION_MESSAGE);
}
Ïà¹ØÎĵµ£º
±ØÐëÓÃthis¹Ø¼ü×ÖµÄÈýÖÖÇé¿ö:
1.ÎÒÃÇÏëͨ¹ý¹¹Ôì·½·¨½«Íⲿ´«ÈëµÄ²ÎÊý¸³Öµ¸ø³ÉÔ±±äÁ¿,¶ø¹¹Ôì·½·¨µÄÐÎʽ²ÎÊýÓëÀà³ÉÔ±µÄ±äÁ¿ÃûÏàͬ,Õâʱ¾ÍÐèÒªthisÕâ¸ö¹Ø¼ü×ÖÀ´Çø±ð¾Ö²¿±äÁ¿ÓëÀà±äÁ¿;
2.¼ÙÉèÓÐÒ»¸öÈÝÆ÷ÀàºÍÒ»¸ö²¿¼þÀà,ÔÚÈÝÆ÷ÀàµÄij¸ö·½·¨ÖÐÒª´´½¨²¿¼þÀàµÄʵÀý¶ÔÏó,¶ø²¿¼þÀàµÄ¹¹Ôì·½·¨Òª½ÓÊÕÒ»¸ö´ú±íÆäËùÔÚÈÝÆ÷µÄ²ÎÊý,ÕâÊ±Ò²Ò ......
ÿ¸öJavaÓ¦Óö¼¿ÉÒÔÓÐ×Ô¼ºµÄ°²È«¹ÜÀíÆ÷£¬ËüÊÇ·À·¶¶ñÒâ¹¥»÷µÄÖ÷Òª°²È«ÎÀÊ¿¡£°²È«¹ÜÀíÆ÷ͨ¹ýÖ´ÐÐÔËÐн׶μì²éºÍ·ÃÎÊÊÚȨ£¬ÒÔʵʩӦÓÃËùÐèµÄ°²È«²ßÂÔ£¬´Ó¶ø±£»¤×ÊÔ´ÃâÊܶñÒâ²Ù×÷µÄ¹¥»÷¡£Êµ¼ÊÉÏ£¬°²È«¹ÜÀíÆ÷¸ù¾ÝJava°²È«²ßÂÔÎļþ¾ö¶¨½«ÄÄ×éȨÏÞÊÚÓèÀࡣȻ¶ø£¬µ±²»¿ÉÐŵÄÀàºÍµÚÈý·½Ó¦ÓÃʹÓÃJVMʱ£¬Java°²È«¹Ü ......
/**
*
* @param par
* ÈëÁ¦Ãû
* @return ÈëÁ¦値
*/
public static String inputfromConsole(String par) {
System.out.println(par);
InputStreamReader ......
41¡¢ÊÇ·ñ¿ÉÒԼ̳ÐStringÀà?
StringÀàÊÇfinalÀà¹Ê²»¿ÉÒԼ̳С£
42¡¢swtichÊÇ·ñÄÜ×÷ÓÃÔÚbyteÉÏ£¬ÊÇ·ñÄÜ×÷ÓÃÔÚlongÉÏ£¬ÊÇ·ñÄÜ×÷ÓÃÔÚStringÉÏ?
switch£¨expr1£©ÖУ¬expr1ÊÇÒ»¸öÕûÊý±í´ïʽ¡£Òò´Ë´«µÝ¸ø switch ºÍ case Óï¾äµÄ²ÎÊýÓ¦¸ÃÊÇ int¡¢ short¡¢ char »òÕß byte¡£long,st ......
C#´ÓJava¼Ì³Ð¶øÀ´µÄÌصã
¡¡¡¡Àà:ÔÚC#ÖÐÀàµÄÉêÃ÷ÓëJavaºÜÏàËÆ.ÕâÊǺÏÀíµÄÒòΪ¾Ñé¸æËßÎÒÃÇJavaÄ£Ð͹¤×÷µÃºÜºÃ.JavaµÄ¹Ø¼ü×ÖimportÒѾ±»Ìæ»»³Éusing,ËüÆðµ½ÁËͬÑùµÄ×÷ÓÃ.Ò»¸öÀ࿪ʼִÐеÄÆðµãÊǾ²Ì¬·½·¨Main().ÏÂÃæµÄHello World³ÌÐòչʾÁË»ù±¾µÄÐÎʽ:
¡¡¡¡using System;
¡¡¡¡class Hello
¡¡¡¡{
¡¡¡¡static v ......