473,404 Members | 2,195 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

how to hightlight different text in one textarea

We are doing project on java-IDE in MCS-I .
We want to know how to highlight syntax of java programs.
We have used one textarea which has whole program in one string and that string has been assigned to that textarea.
Our problem is how to identify various keywords and methods (to change the colors),while the user is typing the program.
If has a solution so please do reply.
Oct 23 '07 #1
1 1463
JosAH
11,448 Expert 8TB
We are doing project on java-IDE in MCS-I .
We want to know how to highlight syntax of java programs.
We have used one textarea which has whole program in one string and that string has been assigned to that textarea.
Our problem is how to identify various keywords and methods (to change the colors),while the user is typing the program.
If has a solution so please do reply.
You can't do that with a JTextArea; have a look at the other JTextComponents:
JEditorPane and JTextPane.

kind regards,

Jos
Oct 23 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Doug van Vianen | last post by:
Hi, I am working on an Applet which provides some mouse practice for new computer users in our local seniors' computer club. The applet contains several cards, in a card layout, which are...
1
by: Terence Parker | last post by:
I have a form which enables users to type in some text in a <TEXTAREA>, allowing them to use HTML. I have defined two submit buttons - one to submit as usual, but one which I would like to popup...
3
by: francisco lopez | last post by:
I hope not sent I twice. ok here is my problem, the javascript form validation works perfect during I put a emaildirection in the <form action:""> comand, like this: <form...
1
by: amirkargerweb | last post by:
I want to do this: <textarea> perl <font color="FF0000"> $thing_to_get=17; </font> More Perl code using $thing_to_get </textarea>
1
by: IkBenHet | last post by:
Hello, I found this script to create a simple rich text form (http://programmabilities.com/xml/index.php?id=17): <html> <head> <title>Rich Text Editor</title> </head> <body>
2
by: Les Peabody | last post by:
Hello. I'm a rookie ASP VBScripter and am having a difficult time scripting the following scenario: I have an index.asp file that has a multi-line text box and a button of type button. When...
1
by: bb nicole | last post by:
Below is my interface for resume which need to post into database... I have did it all in one page and it already can send into database which the table name resume... But my letturer now want me...
0
by: manimuthu | last post by:
Hai, I am newbie in perl. I had tried to search a particular text and hightlight the text. I had using perl tk for text widgets. Anyone can helpme how to highlight text for using text widget....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.