All pastes #611324 Raw Edit

SHMIL

public java v1 · immutable
·published 2007-07-09 21:34 UTC
rendered paste body
import java.awt.FlowLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.JApplet;import javax.swing.*;import java.awt.Container;public class Applet01 extends JApplet implements ActionListener{               public void init()    {         Container content = getContentPane();         content.setLayout(new FlowLayout());          content.add(makeButton(JButton.BOTTOM, JButton.LEFT, "some name"));    }        private JButton makeButton(int v, int h, String name) {    	JButton button = new JButton(name);    	button.setHorizontalAlignment(h);    	button.setVerticalAlignment(v);    	return button;    }    public void actionPerformed(ActionEvent e)     {        JOptionPane.showMessageDialog(null,"Test");    }   }