Java GUI 🖼️

Publicado el: 08 agosto 2020
en el canal de: 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

}
}


En esta página del sitio puede ver el video en línea Java GUI 🖼️ de Duración hora minuto segunda en buena calidad , que subió el usuario Bro Code 08 agosto 2020, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 130,170 veces y le gustó 4.3 mil a los espectadores. Disfruta viendo!