All pastes #511194 Raw Edit

Parameter

public java v1 · immutable
#511194 ·published 2007-05-26 09:30 UTC
rendered paste body
import java.awt.*;import java.awt.event.*;import javax.swing.*;import javax.swing.border.*;/** * This code was edited or generated using CloudGarden's Jigloo SWT/Swing GUI * Builder, which is free for non-commercial use. If Jigloo is being used * commercially (ie, by a corporation, company or business for any purpose * whatever) then you should purchase a license for each developer using Jigloo. * Please visit www.cloudgarden.com for details. Use of Jigloo implies * acceptance of these licensing terms. A COMMERCIAL LICENSE HAS NOT BEEN * PURCHASED FOR THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED LEGALLY FOR * ANY CORPORATE OR COMMERCIAL PURPOSE. */    <applet code="Test.class" width="990" height="571">      <param name="nick" value="asd">    </applet>public class Test extends javax.swing.JApplet {	private JTextField nptText;	private JScrollPane pnlTextScroll;	private JTextPane pnlText;	private String nick = getParameter("nick");	public static void main(String[] args) {		JFrame frame = new JFrame();		Test inst = new Test();		frame.getContentPane().add(inst);		((JComponent) frame.getContentPane()).setPreferredSize(inst.getSize());		frame.pack();		frame.setVisible(true);	}	public Test() {		super();		initGUI();	}	private void initGUI() {		try {			this.setSize(945, 560);			getContentPane().setLayout(null);			{				nptText = new JTextField();				getContentPane().add(nptText);				nptText.setBounds(7, 518, 931, 21);				nptText.setBorder(BorderFactory						.createEtchedBorder(BevelBorder.LOWERED));				nptText.addActionListener(new ActionListener() {					public void actionPerformed(ActionEvent evt) {						pnlText.setText(pnlText.getText() + "\n" + nick + ": " + nptText.getText());					}				});			}			{				pnlTextScroll = new JScrollPane();				getContentPane().add(pnlTextScroll);				pnlTextScroll.setBounds(7, 7, 770, 511);				pnlTextScroll						.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);				{					pnlText = new JTextPane();					pnlTextScroll.setViewportView(pnlText);					pnlText.setBorder(BorderFactory							.createEtchedBorder(BevelBorder.LOWERED));					pnlText.setText("Chatraum: " + chatroomName + "");					pnlText.setPreferredSize(new java.awt.Dimension(767, 514));				}			}		} catch (Exception e) {		}	}}