Article View: comp.lang.java.help
Article #132Re: Copying Text from one text box to another
From: Billy Tam
Date: Sun, 28 Apr 2002 15:58
Date: Sun, 28 Apr 2002 15:58
49 lines
3025 bytes
3025 bytes
import java.awt.*;
import java.awt.event.*;
import java.applet.Applet;
public class CopyText extends Applet implements ActionListener
{
private int WIDTH = 300;
private int HEIGHT = 50;
private Label inputLabel, outputLabel;
private TextField inputText, outputText;
private Panel leftPanel, rightPanel;
public void init ()
{
inputLabel = new Label ( "Input" );
outputLabel = new Label ( "Output " );
inputText = new TextField ( 5 );
outputText = new TextField ( 5 );
inputText.addActionListener ( this );
leftPanel = new Panel ();
rightPanel = new Panel ();
leftPanel.setLayout ( new FlowLayout ());
rightPanel.setLayout ( new FlowLayout ());
leftPanel.add ( inputLabel );
leftPanel.add ( inputText );
rightPanel.add ( outputLabel );
rightPanel.add ( outputText );
this.add ( leftPanel );
this.add ( rightPanel );
setBackground ( Color.white );
setSize ( WIDTH, HEIGHT );
}
public void actionPerformed ( ActionEvent event )
{
outputText.setText ( inputText.getText ());
}
}
-Bill
Technical Details
Message-ID:
<Pine.HPX.4.21.0204280854020.9177-100000@hills.ccsf.cc.ca.us>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!195.40.4.120.MISMATCH!easynet-quince!easynet.net!proxad.net!enews.sgi.com!sdd.hp.com!usc.edu!newshub.csu.net!sand.ccsf.cc.ca.us!hills.ccsf.cc.ca.us!btam01References:
<3ccabd92$0$17268$afc38c87@news.optusnet.com.au> <1019931188.442475@dyfi> <3ccb52b9$0$17282$afc38c87@news.optusnet.com.au>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10bacc,c3071af052420cec X-Google-Attributes: gid10bacc,public X-Google-Thread: fb3cb,c3071af052420cec X-Google-Attributes: gidfb3cb,public X-Google-Thread: 10a146,c3071af052420cec X-Google-Attributes: gid10a146,public X-Google-Thread: 10568c,c3071af052420cec X-Google-Attributes: gid10568c,public X-Google-Thread: 107d55,c3071af052420cec X-Google-Attributes: gid107d55,public X-Google-Thread: fb99b,c3071af052420cec X-Google-Attributes: gidfb99b,public X-Google-Thread: 115d3b,c3071af052420cec X-Google-Attributes: gid115d3b,public X-Google-Thread: 113ae9,c3071af052420cec X-Google-Attributes: gid113ae9,public X-Google-ArrivalTime: 2002-04-28 09:02:10 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!195.40.4.120.MISMATCH!easynet-quince!easynet.net!proxad.net!enews.sgi.com!sdd.hp.com!usc.edu!newshub.csu.net!sand.ccsf.cc.ca.us!hills.ccsf.cc.ca.us!btam01 From: Billy Tam <btam01@ccsf.cc.ca.us> Newsgroups: comp.lang.java.help,comp.lang.java.javascript,comp.lang.java.programmer,comp.lang.java.security,comp.lang.java.tech,comp.lang.javascript,cz.comp.lang.java,de.comp.lang.java,fj.comp.lang.javascript Subject: Re: Copying Text from one text box to another Date: Sun, 28 Apr 2002 08:58:05 -0700 Organization: City College of San Francisco Lines: 52 Message-ID: <Pine.HPX.4.21.0204280854020.9177-100000@hills.ccsf.cc.ca.us> References: <3ccabd92$0$17268$afc38c87@news.optusnet.com.au> <1019931188.442475@dyfi> <3ccb52b9$0$17282$afc38c87@news.optusnet.com.au> NNTP-Posting-Host: hills.ccsf.cc.ca.us Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII To: GaZ <x_gazar_x@hotmail.com> In-Reply-To: <3ccb52b9$0$17282$afc38c87@news.optusnet.com.au>