05 Jframe
05 Jframe
JFrame works like the main window where components like labels, buttons,
textfields are added to create a GUI.
Constructors:
2
Methods
import java.awt.GraphicsConfiguration;
import javax.swing.JFrame;
/**
*
* @author mhcrnl
*/
public class Main {
/**
* @param args the command line arguments
*/
static GraphicsConfiguration gc;
}
3
Photo:
4
Set title of JFrame:
import java.awt.GraphicsConfiguration;
import javax.swing.JFrame;
/**
* @param args the command line arguments
*/
static GraphicsConfiguration gc;
5
Set title of JFrame:
6
Change window size of a frame
import java.awt.GraphicsConfiguration;
import javax.swing.JFrame;
7
Closing a frame:
import java.awt.GraphicsConfiguration;
import javax.swing.JFrame;
8
End