|
-
March 15th, 1999, 08:06 PM
#1
TextField
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.
-
March 16th, 1999, 12:49 AM
#2
Re: TextField
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
-
March 17th, 1999, 03:58 AM
#3
Re: TextField
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
[email protected]
-
April 28th, 2000, 01:06 AM
#4
Re: TextField
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
#5
Re: TextField
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: [email protected]
-
April 28th, 2000, 09:47 AM
#6
Re: TextField
Gauri,
If you want to just display a dialog box, try using the JDialog in SWING.
Sushma
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|