Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/312.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 是否可以在Windows 10中获得旧版本的Windows外观?_Java_Windows_Swing_User Interface_Look And Feel - Fatal编程技术网

Java 是否可以在Windows 10中获得旧版本的Windows外观?

Java 是否可以在Windows 10中获得旧版本的Windows外观?,java,windows,swing,user-interface,look-and-feel,Java,Windows,Swing,User Interface,Look And Feel,我使用的是Windows10,我有一个javax.swing应用程序,它的默认外观是Windows10。我想用旧的windows外观装饰我的应用程序 此代码 try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception ex) { } 它将只返回Windows10的外观 是否有可能获得较旧的windows外观?当我运行代码测试此功能时,会得到以下输出: run

我使用的是Windows10,我有一个javax.swing应用程序,它的默认外观是Windows10。我想用旧的windows外观装饰我的应用程序

此代码

try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} 
catch (Exception ex) {
}
它将只返回Windows10的外观


是否有可能获得较旧的windows外观?

当我运行代码测试此功能时,会得到以下输出:

run:
javax.swing.UIManager$LookAndFeelInfo[Metal javax.swing.plaf.metal.MetalLookAndFeel]
javax.swing.UIManager$LookAndFeelInfo[Nimbus javax.swing.plaf.nimbus.NimbusLookAndFeel]
javax.swing.UIManager$LookAndFeelInfo[CDE/Motif com.sun.java.swing.plaf.motif.MotifLookAndFeel]
javax.swing.UIManager$LookAndFeelInfo[Windows com.sun.java.swing.plaf.windows.WindowsLookAndFeel]
javax.swing.UIManager$LookAndFeelInfo[Windows Classic com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel]
看起来您的选择是Windows 10和“经典”之类的(可能更接近Windows的早期版本)。不幸的是,我想你没有很多工作就卡住了

package quicktest;

import javax.swing.UIManager;

/**
 *
 * @author Brenden
 */
public class LookAndFeelTest {
   public static void main( String[] args ) {
      UIManager.LookAndFeelInfo info[] = UIManager.getInstalledLookAndFeels();
      for( int i = 0; i < info.length; i++ ) {
         UIManager.LookAndFeelInfo lookAndFeelInfo = info[i];
         System.out.println( lookAndFeelInfo );
      }
   }
}
packagequicktest;
导入javax.swing.UIManager;
/**
*
*@作者布伦登
*/
公共类LookAndFeelTest{
公共静态void main(字符串[]args){
UIManager.LookAndFeelInfo信息[]=UIManager.getInstalledLookAndFeels();
对于(int i=0;i
当我运行代码来测试这一点时,我得到以下输出:

run:
javax.swing.UIManager$LookAndFeelInfo[Metal javax.swing.plaf.metal.MetalLookAndFeel]
javax.swing.UIManager$LookAndFeelInfo[Nimbus javax.swing.plaf.nimbus.NimbusLookAndFeel]
javax.swing.UIManager$LookAndFeelInfo[CDE/Motif com.sun.java.swing.plaf.motif.MotifLookAndFeel]
javax.swing.UIManager$LookAndFeelInfo[Windows com.sun.java.swing.plaf.windows.WindowsLookAndFeel]
javax.swing.UIManager$LookAndFeelInfo[Windows Classic com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel]
看起来您的选择是Windows 10和“经典”之类的(可能更接近Windows的早期版本)。不幸的是,我想你没有很多工作就卡住了

package quicktest;

import javax.swing.UIManager;

/**
 *
 * @author Brenden
 */
public class LookAndFeelTest {
   public static void main( String[] args ) {
      UIManager.LookAndFeelInfo info[] = UIManager.getInstalledLookAndFeels();
      for( int i = 0; i < info.length; i++ ) {
         UIManager.LookAndFeelInfo lookAndFeelInfo = info[i];
         System.out.println( lookAndFeelInfo );
      }
   }
}
packagequicktest;
导入javax.swing.UIManager;
/**
*
*@作者布伦登
*/
公共类LookAndFeelTest{
公共静态void main(字符串[]args){
UIManager.LookAndFeelInfo信息[]=UIManager.getInstalledLookAndFeels();
对于(int i=0;i