Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package javaClass;
- import java.util.Scanner;
- import javax.swing.*;
- import java.awt.*;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
- import javax.swing.filechooser.FileFilter;
- import java.io.*;
- interface Age{
- void printt();
- }
- public class Main {
- static int num;
- public static void main(String[] args) throws IOException {
- JFrame frame = new JFrame("Fahrenheit");
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- frame.setBackground(Color.WHITE);
- frame.setPreferredSize(new Dimension(300,100));
- JTextField text1 = new JTextField();
- text1.setPreferredSize(new Dimension(100,100));
- JButton button1 = new JButton("NORTH");
- JButton button2 = new JButton("SOUTH");
- JButton button3 = new JButton("EAST");
- JButton button4 = new JButton("WEST");
- frame.add(button1,BorderLayout.NORTH);
- frame.add(button2,BorderLayout.SOUTH);
- frame.add(button3,BorderLayout.EAST);
- frame.add(button4,BorderLayout.WEST);
- frame.add(text1,BorderLayout.CENTER);
- frame.pack();
- frame.setVisible(true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement