-
2 JTextArea questions
I have two questions about a JTextArea in my code
1. Colouring, I would like to colour certain words, e.g apple should be green, pear should be green and bold etc..
2. I want to add line numbers to each line, at the moment the number of lines is listed on the bottom, but I'd like there to be a number next to each line.
It was created like this:
static JTextComponent textbox = new JTextArea("", 23, 60);
so, if anyone has any ideas I'll be very grateful!
Alex
-
You want to work in HTML in your JTextArea to get the text effects, and you hard code a line number for each new line of text ...
Similar Threads
-
By pravin007 in forum Java
Replies: 4
Last Post: 05-07-2013, 04:48 AM
-
By pravin007 in forum Java
Replies: 0
Last Post: 12-16-2006, 02:04 AM
-
Replies: 1
Last Post: 07-16-2006, 08:25 PM
-
By galgal5814 in forum ASP.NET
Replies: 5
Last Post: 03-10-2006, 11:10 AM
-
Replies: 13
Last Post: 05-23-2005, 05:22 PM
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks