Set JFrame decoration to MetalLookAndFeel decoration



************************************************************************
COMPLETE SOURCE CODE FOR : SetJFrameDecorationToMetalLookAndFeel.java
************************************************************************


import javax.swing.*;
import java.awt.FlowLayout;

public class SetJFrameDecorationToMetalLookAndFeel
{
public static void main(String[]args)
{
//Set JFrame decoration to current look and feel decoration
//You can try to make this line as comment and
//after that try compile and execute it to see it's differential
JFrame.setDefaultLookAndFeelDecorated(true);

JButton myButton=new JButton("Click On Me");

JFrame myFrame=new JFrame("Set JFrame window decoration to current look and feel");
myFrame.setLayout(new FlowLayout());

myFrame.add(myButton);
myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
myFrame.setSize(400,400);
myFrame.setLocationRelativeTo(null);
myFrame.setVisible(true);
}
}


************************************************************************
JUST COMPILE AND EXECUTE IT
************************************************************************

RELAXING NATURE VIDEO