Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/3bbaas/how-to-add-bg-to-java-gui
- Owner: 3bbaas
- Created: 2023-04-26T02:24:54.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-20T07:06:30.000Z (about 1 year ago)
- Last Synced: 2024-01-05T17:52:32.692Z (about 1 year ago)
- Topics: javafx
- Language: Java
- Homepage:
- Size: 202 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)
```javaimport 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();
}
}
```