使用带有GUI的Netbeans进行编程

Onc*_*nca 2 java user-interface swing netbeans look-and-feel

有没有办法在Netbeans预览设计屏幕中显示程序:

previewGUI

而不是默认运行程序GUI:

在此输入图像描述

Jon*_*tan 5

您是否希望设置"外观和感觉"

这是链接中的代码:

// Get the native look and feel class name
String nativeLF = UIManager.getSystemLookAndFeelClassName();

// Install the look and feel
try {
 UIManager.setLookAndFeel(nativeLF);
} catch (InstantiationException e) {
} catch (ClassNotFoundException e) {
} catch (UnsupportedLookAndFeelException e) {
} catch (IllegalAccessException e) {
}
Run Code Online (Sandbox Code Playgroud)