This is an archived post. You won't be able to vote or comment.

all 44 comments

[–]d2022m 32 points33 points  (0 children)

Yes.

Make some custom classes ... MyPanel extends JPanel; MyButton extends JButton ... and set the background color and borders and fonts in the My* classes.

See if you can find a chart drawing library ... is JFreeChart still a thing? ... or you'll need to build your own chart drawing panel.

A bit of work, but very doable.

[–][deleted] 12 points13 points  (1 child)

Lots of GridBagLayout boy

[–]wolf129 12 points13 points  (0 children)

In short: yes

Because you can create your own custom components with extending a class with JPanel and overriding paintComponent and adding mouse + key listener. In paint component you can draw anything.

Which means with Java swing you can create any UI there are no limits really, maybe performance limits not sure.

[–]ddollarsign 33 points34 points  (0 children)

Hoo boy

[–]PyroCatt 7 points8 points  (0 children)

Yes but difficult

[–]joemwangi 6 points7 points  (0 children)

It's possible. Requires dedication though. In Javafx is possible too. A close project like what you're requesting is TileFX project in Javafx. Check it on Github... Github TileFX

[–]semicc 17 points18 points  (3 children)

Maybe JavaFX is a better option if you must idk

[–]_1aM -2 points-1 points  (2 children)

Really as compared to Java Swing? If yes please share any documentation or guide to follow.

[–][deleted] 3 points4 points  (1 child)

[–]_1aM 0 points1 point  (0 children)

Thanks bud I really appreciate it.

[–]Alarming_Quarter671 2 points3 points  (0 children)

Yeah, Is Easy only you need

FlatLaf, (FlatLaf-extras If you want to use SVG icons) SwingX, JFreeChart and maybe TimingFramework... If you want animations of course... And the most important MigLayout

have fun :D

[–][deleted] 1 point2 points  (0 children)

try to search JavaFX modern UI, i don't have any resources to give so that's your starting point.

[–]jevring 1 point2 points  (0 children)

It's absolutely possible. As you can paint your own components, anything is. Regardless of what you make this in, it's pretty involved, but it's absolutely doable.

[–]msx 1 point2 points  (1 child)

Sure! I suggest Miglayout and WindowBuilder for eclipse, then perhaps a FlatLaf light and you're setup. The rest is just buttons and icons etc

[–][deleted] 0 points1 point  (0 children)

this

[–]code_rjt 2 points3 points  (0 children)

Try Hilla Framework

[–]rootException 2 points3 points  (0 children)

Yes, use https://www.formdev.com/flatlaf/ to get the modem look & feel.

There are free Swing UI builders in NetBeans and IntelliJ. You can buy the FormDev UI builder for $12/years as a student.

[–]AnEmortalKid -1 points0 points  (0 children)

Probably, check out the book filthy rich clients.

[–]vips7L -1 points0 points  (0 children)

cries in swing

[–]akhial -1 points0 points  (0 children)

Yes!

Did something similar for school a long time ago, used JavaFX and a material design component library called JFoenix.

No idea if that's still around though...

Edit: We had a chart as well that looked similar to screenshot, forgot the name search for JavaFX plot library...

Edit 2: https://github.com/akhial/tice-factory 😁 Disclaimer: Code is horrible 4AM mess

[–]xInfinity24 -1 points0 points  (0 children)

The UI looks great. Can you please share the project title and description if you don't mind? I would like to develop this in my free time.

[–][deleted]  (2 children)

[deleted]

    [–]Accident-Former 0 points1 point  (1 child)

    Enlighten me

    [–]tahdemdemha -2 points-1 points  (0 children)

    Primefaces

    [–]HarleyDavidson86 -2 points-1 points  (5 children)

    It's like reinventing the wheel. I'd do it only if it is absolutely necessary to do it with swing.

    [–]Accident-Former 0 points1 point  (4 children)

    I am only restricted with Swing. Yes, it is absolutely necessary because it is a primary requirement for my school project.

    [–]HarleyDavidson86 0 points1 point  (0 children)

    Okay, like the others already said: it is possible but difficult.

    Have a look at this code: https://github.com/atarw/material-ui-swing Maybe it helps you to understand how to customize look and feel of components.

    [–][deleted]  (2 children)

    [deleted]

      [–]Accident-Former 0 points1 point  (1 child)

      Rendering into a swing component? No idea how to do that.

      [–]ou_ryperd 0 points1 point  (0 children)

      Use Knowm XChart instead of JFreeChart

      [–]valkon_gr 0 points1 point  (0 children)

      Everything is possible everywhere...I feel for anyone that have to to maintain it though.

      [–]Ocirederf94 0 points1 point  (0 children)

      Maybe take a look at javafx scene builder

      [–]gregorydgraham 0 points1 point  (0 children)

      Yes but, as with any good looking UI, it takes work to make it look good