atarw / material-ui-swing

A modern, Material Design UI for Java Swing
MIT License
653 stars 86 forks source link

Quickstart guide #114

Closed R-N closed 2 years ago

R-N commented 2 years ago

How do I use this? This doesn't seem to be a simple plug and play LAF, or is it?

Thanks

vincenzopalazzo commented 2 years ago

Hi @R-N

Tha project moved to https://github.com/vincenzopalazzo/material-ui-swing this is only a mirroring repository.

How do I use this? This doesn't seem to be a simple plug-and-play LAF, or is it?

Right, it offers also a theme system, but to use it you need just to call this code after importing the dependencies

  static {
    try {
      JDialog.setDefaultLookAndFeelDecorated(true);
      JFrame.setDefaultLookAndFeelDecorated(false);
      UIManager.setLookAndFeel(new MaterialLookAndFeel(new MaterialLiteTheme()));
      // UIManager.setLookAndFeel(new MaterialLookAndFeel(new DarkStackOverflowTheme()));
    } catch (UnsupportedLookAndFeelException e) {
      e.printStackTrace();
    }
  }

See the list of the theme supported here or you can import an external theme like DarkStackOverflowTheme

P.S: More material components? https://github.com/material-ui-swing

R-N commented 2 years ago

@vincenzopalazzo

Thank you. I didn't know which classes to import and use. I had checked the new repo too but I still couldn't find how to use this (I think the readme is identical, and the wiki link already points to that repo). I checked the demo too but it had quite a different structure to my project so I didn't understand. I think it'd be great if you could put that very minimal example in the readme or wiki. Also the list of themes; I didn't know it'd be under screenshots.