All pastes #268240 Raw Edit

Someone

public text v1 · immutable
·published 2006-12-05 14:20 UTC
rendered paste body
public class nick{

public static void main(String[] args) {

	frame fr = new frame();
	
	fr.setVisible(true);
	
}}



/* frame.java */

import javax.swing.*;
import java.awt.*;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;


public class frame extends JFrame {

	public frame() {
		super("NAD");
		setSize(500,400);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		Container content=getContentPane();
		content.setLayout(new BorderLayout());
		
		/* JPanel1 */
		JPanel panel1 = new JPanel(new FlowLayout());
		panel1.add(new JLabel("Enter a MachineIP:    "));
		panel1.add(new JTextField(10));
		panel1.add(new JButton("Add"));
		panel1.add(new JButton("Ping"));
		
		content.add(panel1, BorderLayout.NORTH);
		
		//content.add(new JScrollPane(new JTextArea()), BorderLayout.CENTER);
		
		JPanel box = new JPanel();
		content.add(box, BorderLayout.CENTER);

		JPanel panel2 = new JPanel(new FlowLayout());
		
		JButton ping = new JButton("Ping");
		panel2.add(ping);
		
		panel2.add(new JButton("Isolate"));
		panel2.add(new JButton("Removes"));
		panel2.add(new JButton("Status"));
		
		content.add(panel2, BorderLayout.SOUTH);
		
	}
	
}