'How to centre elements in Jetpack Compose Desktop Column

Working on desktop application with Jetpack Compose and unable to center elements in a Column as horizontalAlignment attribute is not working. I've also seen many other answers saying to use horizontalArrangment but that is also not working for desktop application.

enter image description here

Update: I've imported Alignment from androidx.compose.ui now and able to use CenterHorizontally and error is gone but it's still not getting in centre.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source