Frames

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

public class Main {
    public static void main(String[] args) {
        JFrame frame = new JFrame(); // creates a frame

        frame.setSize(420, 420); // sets the x-dimension, and y-dimension of frame;
        frame.setVisible(true); // make the frame visible
        frame.setTitle("JFRAME Tutorial"); // title of the frame
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // X button āĻ āϚāĻžāĻĒāϞ⧇ fully terminate āĻšā§Ÿā§‡ āϝāĻžāĻŦ⧇āĨ¤

        frame.setBounds(200, 300, 400, 400); // (int x, int y, int width, int height)

//        ===== replacing java logo with ours
        ImageIcon image = new ImageIcon("icon.png"); // image āϟāĻž āĻ…āĻŦāĻļā§āϝāχ Project Root āĻ āϰāĻžāĻ–āϤ⧇ āĻšāĻŦ⧇āĨ¤ src āĻŦāĻž āĻ…āĻ¨ā§āϝ āϕ⧋āύ folder āĻ āύ⧟āĨ¤
        frame.setIconImage(image.getImage());
//        =====
//        ===== change background of the window / frame
        frame.getContentPane().setBackground(Color.green); // default color
        frame.getContentPane().setBackground(new Color(0xED9DED)); // adding custom HEX color
        frame.getContentPane().setBackground(new Color(50, 116, 123)); // adding custom rgb color
//        ===


    }
}