Home | Ajax | BioInformatics | Dojo | EAI | EJB | Hibernate | J2ME | Java | Java Glossary | Java Servlets | JavaScript | Jboss | JDBC | JDO | Jmeter | JSF | JSP | JUnit | Maven | MySQL | Spring Framework | SQL | Struts | Technology | WAP | Web Services | XML


 
  
 
Programming Tutorials: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML
 

 
Facing Programming Problem?
Ask Questions?, Browse Latest Questions, Question-Answer Guidelines
Java
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments

How to Create Text Area In Java

                         

In this section, you will learn how to create Text Area in Java. This section provides you a complete code of the program for illustrating the topic.

Program Description:

Here, a class "TextAreaExample" has been defined. This class has main method in which frame and a panel are created and a text area is also created on the panel by using JTextArea class and it's constructor of java.swing package. In the code of the example, constructor of the JTextArea has been used with three arguments. These arguments are as follows:

  • First parameter is string that is for the value of the Text Area component.
  • Second one is a integer value i.e. for the number of rows of the text area component.
  • And last one is also a integer type value that is for number of columns of the Text Area component.

Here is the code of this program:

import javax.swing.*;

public class TextAreaExample {

  public static void main(String[] args){
    JFrame frame= new JFrame("TextArea frame");
    JPanel panel=new JPanel();
    JTextArea jt= new JTextArea("Welcome Roseindia",5,20);
    frame.add(panel);
    panel.add(jt);
    frame.setSize(250,200);
    frame.setVisible(true);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  }
}

Output this program:

Download this program.

                         

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

1 comments so far (
post your own) View All Comments Latest 10 Comments:

i learn a lot of this program... now,i know how to create text area in java.. thank you so much!!! more power!!! GOD bless.....

Posted by reljen on Tuesday, 08.12.08 @ 13:42pm | #72475

Latest Searches:
program in java to dra
ant pdf
java telecom domain
readln
tabbing
coding of radio button
insert content to text
DOM4J
3DS MAX Modeling Model
ajax tree example
getNumericValue
spring ajax
Move cursor to upper l
Read the Key-Value of
JSF 2
servlet examples
Database MS Access Dat
emailvalidationinjava
java 5 thread pool
fjhjf
Data
HQL self join
Photoshop Textures and
Java Count Vowels
html
delete statement form
java Lang package math
sessions
Java examples on print
treeviewjsp
point of interest geo
join()
java interface with ex
ejb3.0 example, jboss
multilingual
Java show Vowels in th
VoIP PBX System
???ய�??????ய�?
radio button in struts
java write file line b
wait
how to read key value
splashscreen java
runnable
generic
Photoshop Photo Retouc
Combattons la programm
jsp onchange
compare two arraylist
hashset
struts file upload
Table Layout
system services
pseudocode of magic sq
different arithmetic o
J2ME http
jdbc with ms access
reading files
ejb3
link
how to get IP address
isAlive()
Javascript DHTML Javas
how to connect Ms acce
max chars 500 chars i
how to use tab control
how to send email samp
Math.random()
two integers
Javanumbersofsyllables
Java in Flex
AÐ?â?©??Ð??â???Ð??â???
hibernate project
virtual cell phone
Read/Write data in XML
Action Forms
pass parameters
create excel using jav
linking codes using js
threads methods
Java String toLowerCase Example
Java String toCharArray Example
Java String substring Example
Java String indexOf Example
Java String startsWith Example
Java String hashCode Example
Java String matches Example
Java String length Example
Java String lastIndexOf Example
Java String isEmpty Example
Java String equalsIgnoreCase Example
Java String equals Example
Java String endsWith Example
Java String copyValueOf Example
Java String contentEquals Example
  EAI Articles
  Java Certification
Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.