Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class teste extends JFrame{
- ImageIcon imgFundo = new ImageIcon(getClass().getResource("fantasy-2861815_960_720.jpg"));
- JLabel lblFundo = new JLabel(imgFundo);
- public void janela1() {
- setSize(800,600);
- setVisible(true);
- setLocationRelativeTo(null);
- setResizable(false);
- setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- lblFundo.setSize(10,10);
- add(lblFundo);
- }
- public static void main(String[] args) {
- teste t = new teste();
- t.janela1();
- }
Add Comment
Please, Sign In to add comment