Giter VIP home page Giter VIP logo

Comments (4)

atarw avatar atarw commented on August 31, 2024

hi, i can't seem to reproduce this, can you send a small/simplified project for me to test?

from material-ui-swing.

GodIHateThis avatar GodIHateThis commented on August 31, 2024

testlookandfeel.zip

Thought about what could be the cause.

Since i'm using a public pc with w7, and it has a reduced GUI ( looks kinda like w95 mixed with wxp ), maybe that affects how every look and feel looks like, AND it all depends on the users pc.

For example this is how the program look for me without your look and feel applied:
2018-04-19_09-21-11

Edit:Found out that SwingUtilities.updateComponentTreeUI(frame); actually got me closer to your look and feel but the font and the look and feel still glitched out in a few panels.
Where should i run this update function?

from material-ui-swing.

atarw avatar atarw commented on August 31, 2024

did a bit of testing, and the error happens because some jcomponents are initialized before the look and feel is set in the main method (e.g. in the constructor, as well as static variables) - once you move all variable instantiation to after the look and feel is applied, everything works fine.

if you don't want to modify your code, putting the updateComponentTreeUI function at the end of your main method seemed to work fine, although you need to recall MaterialUIMovement.add(...) afterwards on any animated components to update the hover effect separately

NOTE: i modified MaterialUIMovement to become purely static so that users don't have to keep instantiating new instances of the class to add animation effects.

now you can just simply use MaterialUIMovement.add(component, color, steps, interval).

i hope this helps!

from material-ui-swing.

GodIHateThis avatar GodIHateThis commented on August 31, 2024

The main fault was that before the updateComponentTreeUI, a important constructor was initializing.

You should put SwingUtilities.updateComponentTreeUI(JFrame); in the readme thing just in case

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.