繁体   English   中英

用户界面:是否可以在Windows 10中获得较旧的Windows外观?

[英]User interface: Is it possible to get older Windows look and feel in Windows 10?

我正在使用Windows 10,并且有一个javax.swing应用程序,它的默认外观是Windows10。我想用较旧的Windows外观来装饰我的应用程序。

此代码

try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} 
catch (Exception ex) {
}

它只会返回Windows 10的外观。

我的问题是,是否可以使旧的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 );
      }
   }
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM