CSS formatting Java

Answered

Is there a way to implement a CSS file in terms of controlling the way buttons, text, background is displayed?

 

I looked through the options and i dont see a CSS addition...

0
5 comments

Please clarify the functionality you expect to get from IDE and the functionality area you are using: is it GUI Java Swing/FXML/Android designer? Thanks.

Please note that CSS files are supported only in IntelliJ IDEA Ultimate edition.

0
Avatar
Permanently deleted user

i was hoping i can make a css and have it apply to my GUI forms similar in the way of a website where the css would catch forms, text and etc and automatically format them.

 

this is for javafx.

0

You can use integrated Scene builder which helps customizing styles for UI components: i.e. selecting and using css files where to import styles from. What designer does under the hood is to insert into fxml layout references to css files like

<Button mnemonicParsing="false" style="-fx-alignment: centered;" text="Button">
<stylesheets>
<URL value="@./src/main/resources/styles/my_styles.css" />
...

which you then can use for your UI controls. Check related articles for the workflow, e.g. Use a Style Sheet and Preview the UI.

0
Avatar
Permanently deleted user

is that the only convenient way?

 

I currently use .forms and have it built like this.

btw = Lets do this = SynGreis is the same person. I was using the wrong login.

MainPage dialog = new MainPage(SPLASH);
dialog.pack();
dialog.setVisible(true);
System.exit(0);
0

>I currently use .forms

Do you use Swing forms and built-in GUI designer - I do not see a ways to use css and I do not think it is possible at all with plain swing forms. 

It is better to ask the question on java-related forums as it does not directly related to IDE functionality. See e.g. https://stackoverflow.com/a/5959728/2000323

0

Please sign in to leave a comment.