This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.*; //For Window Frame (JFrame) | |
import java.awt.*; //For Container object | |
public class MyGUI { | |
public static void main(String[] args) { | |
new MyGUI(); | |
} | |
public MyGUI(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.*; //For Window Frame (JFrame) | |
import java.awt.*; //For Container object | |
public class MyGUI { | |
public static void main(String[] args) { | |
new MyGUI(); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.*; | |
import java.awt.*; | |
public class MyGUI { | |
JLabel l1,l2; | |
JTextField tf1,tf2; | |
JButton b1,b2; | |
public static void main(String[] args) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.JFrame; | |
public class MyGUI extends JFrame | |
{ | |
public MyGUI() | |
{ | |
setTitle("Tutorial"); | |
setSize(400,400); | |
setVisible(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.JFrame; | |
import java.awt.Graphics; | |
import java.awt.Color; | |
public class MyGUI extends JFrame | |
{ | |
public MyGUI() | |
{ | |
setTitle("Tutorial"); | |
setSize(960,960); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.JFrame; | |
import java.awt.Graphics; | |
import java.awt.Color; | |
public class MyGUI extends JFrame | |
{ | |
public MyGUI() | |
{ | |
setTitle("Tutorial"); | |
setSize(400,400); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.JFrame; | |
import java.awt.Graphics; | |
import java.awt.Color; | |
public class MyGUI extends JFrame | |
{ | |
public MyGUI() | |
{ | |
setTitle("Tutorial"); | |
setSize(400,400); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.BorderLayout; | |
import javax.swing.JFrame; | |
import javax.swing.JLabel; | |
import javax.swing.JButton; | |
import javax.swing.JPanel; | |
public class MyGUI extends JFrame | |
{ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.FlowLayout; | |
import javax.swing.JButton; | |
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
public class MyGUI extends JFrame | |
{ | |
JPanel jp; //Made global so all methods can use this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.JFrame; | |
public class MyGUI extends JFrame { | |
public MyGUI(){ | |
setTitle("Non-resizable frame"); | |
setSize(300,300); | |
setVisible(true); |
OlderNewer