I need help with creating rounded edges for two labels in my interface. I want the first label (Hello) to have rounded edges on the top left and top right, and the dummy label to have rounded edges on the bottom right and bottom left.
I've attempted using -fx-border-radius: 30; in CSS, but it doesn't seem to be working as expected. Please review the class definition for the Hello label. Any assistance would be appreciated!
package com.binaryname.view;
public class Main extends Application {
private ConversionController conversionController = new ConversionController();
private PopupWindow keyboard;
// Rest of the code...
This is my interface.
The issue seems to be related to border-radius in the CSS file named style.css. Here's the complete CSS code:
.center-text-area *.text {
-fx-text-alignment: center;
}
.helloLbl{
-fx-border-radius: 20 20 0 0;
-fx-background-radius: 20 20 0 0;
}
#hello-radius{
-fx-border-radius: 20 20 0 0;
-fx-background-radius: 20 20 0 0;
}
// Rest of the CSS styles...
Below is the FXML structure:
<?import javafx.scene.layout.BorderPane?>
<BorderPane xmlns:fx="http://javafx.com/fxml/1">
<!-- TODO Add Nodes -->
</BorderPane>