问题描述
我正在弄清楚如何在以下窗口中更改标题栏的字体大小:
这是JFrame容器的代码:
public class MyWindow extends JFrame {
//Constructor of my window
public MyWindow() {
this.setSize(600,300);
this.setVisible(true);
this.setLocationRelativeto(null);
this.setDefaultCloSEOperation(EXIT_ON_CLOSE);
this.setTitle("I want to change the font-size of this Title");
this.initComponents();
}
//Declaration and deveploment of the components of my window
private void initComponents() {
JPanel myPanel = new JPanel();
this.getContentPane().add(myPanel);
JLabel myLabel = new JLabel();
myPanel.add(myLabel);
myLabel.setText("Hello World!!!");
myLabel.setFont(new Font("Calibri",Font.BOLD,32));
myLabel.setForeground(Color.decode("#1165AA"));
myPanel.setLayout(null);
myLabel.setBounds(200,80,200,50);
}
}
这是运行程序的Main类代码:
public class Main {
public static void main(String[] args) {
MyWindow window = new MyWindow();
}
}
在阅读了很多文章之后,我认为这是不可能的,因为标题栏样式将由用户操作系统控制,但是我想探索所有选项...
谢谢
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)