Search code examples
javaswinglook-and-feel

How to make a window look like this in Java?


How do I create a window which looks like this in Java:

frame

I want that window layout, instead of the standard Windows-borders, and I don't know how this is called.

Edit: look and feel doesn't work for me:

not working for me


Solution

  • If you want your Look and Feel to draw the window decoration (that's what the "border" is called), then you need to call JFrame.setDefaultLookAndFeelDecorated(true) before creating your JFrame objects and JDialog.setDefaultLookAndFeelDecorated(true) before creating your JDialog objects.