有没有办法让程序像 Netbeans 预览设计屏幕一样显示:
与默认运行程序 GUI 不同:
?
最佳答案
您是否想要设置 "look and feel" ?
这是链接中的代码:
// 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) {
}
关于java - 使用带有 GUI 的 Netbeans 进行编程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12080506/