我有一个 JInternalFrame 类,其构造函数如下所示:
public MyInternalFrame() {
super("Name");
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException ex) {
Logger.getLogger(AutogeneFrame.class.getName()).log(Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
Logger.getLogger(AutogeneFrame.class.getName()).log(Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
Logger.getLogger(AutogeneFrame.class.getName()).log(Level.SEVERE, null, ex);
} catch (UnsupportedLookAndFeelException ex) {
Logger.getLogger(AutogeneFrame.class.getName()).log(Level.SEVERE, null, ex);
}
initComponents();
}
问题是应该在窗口左上角的最大化、最小化和退出按钮没有显示出来。但是,标题“名称”确实显示在标题栏的中心。我在 Mac 上,而不是所有窗口左上角的三个小圆圈(红色、黄色和绿色),它们只是显示为三个不可点击的灰色小圆圈