Java GUI 🖼️

Pubblicato il: 08 agosto 2020
sul canale di: Bro Code
130,170
4.3k

Java GUI frame JFrame swing tutorial for beginners

#Java #GUI #frame #JFrame #swing #tutorial #beginners

import java.awt.Color;
import javax.swing.ImageIcon;
import javax.swing.JFrame;

public class Main {

public static void main(String[] args) {

// JFrame = a GUI window to add components to

JFrame frame = new JFrame(); //creates a frame
frame.setTitle("JFrame title goes here"); //sets title of frame
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //exit from application
frame.setResizable(false); //prevent frame from being resized
frame.setSize(420,420); //sets the x-dimension, and y-dimension of frame
frame.setVisible(true); //make frame visible

ImageIcon image = new ImageIcon("logo.png"); //create an ImageIcon
frame.setIconImage(image.getImage()); //change icon of frame
frame.getContentPane().setBackground(new Color(0x123456)); //change color of background

}
}


In questa pagina del sito puoi guardare il video online Java GUI 🖼️ della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Bro Code 08 agosto 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 130,170 volte e gli è piaciuto 4.3 mille spettatori. Buona visione!