一个旧线程(2009)提到了以下内容:
val area = new TextArea {
font = new Font("Arial", 0, 8)
}
但是该代码对当前版本的 scala.swing 没有影响。我也尝试过
area.peer.setFont(new Font("Arial", 0,8).
这也没有效果。那么正确的做法是什么呢?
最佳答案
也许:
val area = new TextArea
area.setFont(new Font("Arial", 0, 8))
关于swing - 在 Scala TextArea 中设置字体和大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34306941/