Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/3bbaas/how-to-add-bg-to-java-gui

How to add bg to java gui
https://github.com/3bbaas/how-to-add-bg-to-java-gui

javafx

Last synced: 2 months ago
JSON representation

How to add bg to java gui

Awesome Lists containing this project

README

        

## How to add background to java GUI?

### Video
[click here](https://drive.google.com/file/d/1GOyhSk4XijDkR_fddyjMUHSkddCIlILq/view?usp=sharing)

- image we used it
![](36600.jpg)

- Code i wrote it - file of code [here](Code.java)
```java

import javax.swing.*;

public class Main extends JFrame {
JFrame _3bbas = new JFrame();
JLabel background;

Main() {
setSize(1080, 720);
setLayout(null);
setVisible(true);
ImageIcon bg = new ImageIcon(
"C:\\Users\\ASUS\\Desktop\\find that\\36600.jpg"
);
background = new JLabel("", bg, JLabel.CENTER);
background.setSize(1080, 720);
add(background);
}
public static void main(String[] args) {
Main m = new Main();
}
}
```