//
<JFXButton fx:id="Entry" prefHeight="103.0" prefWidth="650.0" style="-fx-background-color: #3A84C3; -fx-background-radius: 1em;"
text="录入数据" textFill="WHITE" onAction="#handleButtonClicks">
<font>
<Font name="System Bold" size="20.0" />
</font>
<graphic>
<ImageView fitHeight="50.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="/home/icons/Entry.png" />
</image>
</ImageView>
</graphic>
</JFXButton>
效果如图

本文详细介绍了使用FXML设计按钮样式的具体实现方法,包括设置背景颜色、边框半径、文字颜色、字体大小及图标等元素,展示了如何通过代码创建具有视觉吸引力的用户界面组件。

4115

被折叠的 条评论
为什么被折叠?



