Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- Name: Brandon Altuchow
- ID: 0207256
- Date: 9/23/17
- Description: Assignment 15 - GUI Applications
- */
- package gui.applications;
- import javax.swing.*;
- import java.awt.*;
- public class GUIApplications extends JFrame{
- Container content = this.getContentPane();
- Font nameFont = new Font("serif", Font.BOLD, 36);
- Font dateFont = new Font("sansserif", Font.BOLD, 36);
- Color nameColor = new Color(255,0,0);
- Color dateColor = new Color(.1F,1.0F,.1F);
- JLabel lblFName = new JLabel("Brandon");
- JLabel lblLName = new JLabel("Altuchow");
- JLabel lblDate = new JLabel("9/23/17");
- public GUIApplications(){
- this.setVisible(true);
- this.setSize(300, 300);
- this.setTitle("First GUI App");
- this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- content.setLayout(new GridLayout(3,1));
- content.add(lblFName);
- lblFName.setFont(nameFont);
- lblFName.setForeground(nameColor);
- content.add(lblLName);
- lblLName.setFont(nameFont);
- lblLName.setForeground(nameColor);
- content.add(lblDate);
- lblDate.setFont(dateFont);
- lblDate.setForeground(dateColor);
- }
- public static void main(String[] args) {
- GUIApplications gui = new GUIApplications();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement