Giter VIP home page Giter VIP logo

Comments (8)

 avatar commented on July 27, 2024 1

Many thanks Vincenzo!
But I can't make it work...
I've tried to change "inactiveBackground" to "unfocusedBackground" but neither of them works.

from material-ui-swing.

vincenzopalazzo avatar vincenzopalazzo commented on July 27, 2024 1

@atarw The problem is not netbinse 'cause I test the look and feel I always do it with him, rather I think his jar is corrupt.

Yesterday I was fixing a few things on my fork and I got a similar error, very similar so I think the JtextField is ok

ps: Excuse the intrusion

from material-ui-swing.

atarw avatar atarw commented on July 27, 2024 1

Fixed!

To change the active color of a JTextfield, change JTextfield.selectionColor, or for the unfocused background, changing UIManager.put("TextField.inactiveBackground", ...) should work.

You can also change JTextField.selectionTextColor and UIManager.put("TextField.inactiveForeground", ...) for more customization

from material-ui-swing.

 avatar commented on July 27, 2024

Exception in thread "main" java.lang.ExceptionInInitializerError
at mdlaf.MaterialLookAndFeel.initComponentDefaults(MaterialLookAndFeel.java:148)
at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:148)
at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1577)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:539)
at MainClass.MainClass.main(MainClass.java:29)
Caused by: java.lang.IllegalArgumentException: input == null!
at javax.imageio.ImageIO.read(ImageIO.java:1348)
at mdlaf.utils.MaterialImages.loadImg(MaterialImages.java:36)
at mdlaf.utils.MaterialImages.(MaterialImages.java:30)
... 5 more
Java Result: 1

from material-ui-swing.

vincenzopalazzo avatar vincenzopalazzo commented on July 27, 2024

Hello @khadapps ,
I was thinking about how to make personalization easier, while I give you a hand in personalization, try the following piece of code after setting the look and feel.

UIManager.put("TextField.inactiveBackground", new Color(35, 35, 35);

I hope to be proved helpful

from material-ui-swing.

vincenzopalazzo avatar vincenzopalazzo commented on July 27, 2024

@khadapps
From your exception it seems that the look and feel can not find the images that he uses himself to render the components, can you please post the open jar screen?
it should have done something similar but not the same because I use a different pom.xml
screenshot from 2018-09-04 20-10-44

from material-ui-swing.

atarw avatar atarw commented on July 27, 2024

Wait I'm a bit confused. Is the issue that Netbeans doesn't load the jar or does it have to do with the text field?

from material-ui-swing.

 avatar commented on July 27, 2024

Hello, my problem is just that I can't change the color of the unfocused background of the JTextField.
So far I've tried things like the code UIManager.put("TextField.inactiveBackground", new Color(35, 35, 35); code but it didn't works.

from material-ui-swing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.