0

I am trying to edit the JFrame top buttons like steam has in color "dark grey".

JFrame "TOP"

I would like to remove or add more components like "JButtons or Icons" at this section.

Do not know if there is a way where you do not need to change the "look & feel" complete or adding default UIManager using [UIManager.setLookAndFeel(something)].

If anyone of you know how to do this by only changing one property or two of the UIManager or something like that i would be interested, thank you.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
D_Larks
  • 3
  • 2
  • On Windows, people expect the top bar to be the same for all applications. I'm guessing its true for other operating systems. You can create a [JToolBar](https://docs.oracle.com/javase/tutorial/uiswing/components/toolbar.html) if you want to give the user easy to select options. – Gilbert Le Blanc Apr 28 '21 at 22:36
  • In general Swing isn't built to separate presentation from design. The assumption is you hand all look and feel over to a UIManager. There are various hacks and third party libraries available. But really the right long term answer is to switch to JavaFX which explicitly support styling. – sprinter Apr 28 '21 at 22:36

1 Answers1

1

Install another LookAndFeel.

Maybe you like http://www.jtattoo.net/

JayC667
  • 2,418
  • 2
  • 17
  • 31
  • Yes i saw that possibility, but im looking for change the color // add more items // with only a few code-lines. For example -- UI.Manager("JFrame.Top.Color", new Color(0,255,255)) [Do not know if it exists or if it is possible] – D_Larks Apr 28 '21 at 22:31
  • You'd have to dive deep into the LookAndFeel system. And you'd have to do that BEFORE any UI elements are shown. Actually you can "break open" protected member variables from other classes, using Reflection. So if you can, dive into the source code of the LookAndFeel you're using, set some breakpoints in there, check out what needs to be done. Warning: your intrusion might not be portable to other OSs. Installing different LookAndFeels is a lot easier. Or maybe change to JavaFX. – JayC667 Apr 28 '21 at 22:44