N
N
NagerG2021-07-07 10:44:44
Java
NagerG, 2021-07-07 10:44:44

How to set UI for a specific element?

I have a method that sets the UIManager for the entire frame, but how can I set the UI(Nimbus ) for just one element (in this case, JTextField)?
The method itself:

private void setLookAndFeel() {
        try {
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
        }
        catch (Exception exc) {

        }
    }

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question