Click to See Complete Forum and Search --> : TextField
Gauri
March 15th, 1999, 07:06 PM
Can I create a TextField and TextArea in a frame? I want to create an application.
I want to create a dialog box. Ask the user for user_id, password and URL,connect to the database and
authenticate it. I am using JDBC driver and JDK 1.2.
praks
March 15th, 1999, 11:49 PM
Hi Gauri,
Ya offcourse u can.
U can find this in any tutorials - how to add TextFields and TextArea in a Frame
or Dialog. If not let me know.
One of the good resources is sun java tutorials. try sun site.
..praks
thiru
March 17th, 1999, 02:58 AM
Hi Gauri,
class Frame1 extend Frame
{
Frame1()
{
...
...
// this code
textField1 = new java.awt.TextField();
// u could use a layoutmanager to skip the foll. code line
textField1.setBounds(insets().left + 240,insets().top + 60,137,30);
add(textField1);
textArea1 = new java.awt.TextArea();
// u could use a layoutmanager to skip the foll. code line
textArea1.setBounds(insets().left + 240,insets().top + 120,149,58);
add(textArea1);
.....
}
// to connect to database u should use jdbc code.
// i suggest u to use Symantec's Visual Cafe (IDE) which is simple
// to create forms similar to VB.
best wishes
thiru
psthiru@wipsys.soft.net
Shyam Sunder L
April 28th, 2000, 01:06 AM
Hi !
you can create TextField and TextArea
Frame f = new Frame("MyWindow");
TextFiled tf = new TextField(" ",30);
TextArea ta = new TextArea(5,30);
f.setLayout(new FlowLayout());
f.add(tf);
f.add(ta);
you can use setEditable() for TextFiled,TextArea also,
Shyam Sunder Reddy L,
India.
April 28th, 2000, 01:23 AM
hi gouri,
Since u ar using jdk1.2 plz make me confirm u ar using Swing or awt first.
if u ar using awt simply create
Frame f=new Frame("Sample");
TextField tf=new TextField("");
TextArea ta=new TextArea("");
f.add(tf);
f.add(ta);
and if u ar using Swing use JFrame,JTextField and JTextArea.
But u may problems with light weight and heavy weight components
if there is any problem set the parent ie. JFrame as a heavy weight component for syntax plz refer the api.
with regards
bharath reddy s.v
Email to: bharath@vsofti.stph.net
sush
April 28th, 2000, 09:47 AM
Gauri,
If you want to just display a dialog box, try using the JDialog in SWING.
Sushma
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.