我有一个JavaFX应用程序,atm只是一个BorderPane,顶部有一个ToolBar.它看起来像这样:

我想知道是否有办法删除窗口顶部和ToolBar之间的界限,使它看起来像这样:

我已经尝试将ToolBar的边框宽度和BorderPane的边框宽度设置为0,但都没有帮助.
我有一个包含图像的 NSSegmentedControl(todayButton) 。我正在尝试使用以下命令在图像上绘制一些文本:
NSImage *img = [todayButton imageForSegment:0]
[img lockFocus]
[@"15" drawAtPoint:NSZeroPoint withAttributes:nil]
[img unlockFocus]
[img setTemplate:YES]
Run Code Online (Sandbox Code Playgroud)
图像被设置为模板,不会引发任何错误,但图像上不会出现任何文本。