Results 1 to 4 of 4
- 12-21-2008, 04:33 AM #1
Member
- Join Date
- Dec 2008
- Posts
- 8
- Rep Power
- 0
[SOLVED] same textbox with different coloured texts
I am making a simple IDE/debugger for microchip assembler and can't figure out how to make a textbox to display different coloured texts at once in the same box. Is this simple/possible? Or will I have to create my own textbox-like component from scratch?
Thankful as always for your advice,
Goseph
-
Is this for a Swing application? If so, you may wish to look into use of a JTextPane component. It's more complex than a JTextArea, but it allows for a lot more flexibility when setting the style attributes of the text found in the component. There's a decent Sun tutorial on it here: How to Use Editor Panes and Text Panes (The Java™ Tutorials > Creating a GUI with JFC/Swing > Using Swing Components)
On an unrelated note, you may wish to respond to neilcoffey's reply to your question on image drawing and saving here: http://www.java-forums.org/java-2d/1...html#post46937
It's simply good etiquette to thank any folks who try to help you here, and also it may help motivate them to help you again in the future.
Good luck.
- 12-21-2008, 08:49 PM #3
Member
- Join Date
- Dec 2008
- Posts
- 8
- Rep Power
- 0
yes its swing, thats great I'll use JTextPane thanks alot.
-
Similar Threads
-
Using other language texts(Hindhi/Chinese) in eclipse editor
By dhandapanik in forum EclipseReplies: 1Last Post: 08-21-2009, 09:07 PM -
draw in jpanel using values input in textbox
By New to JAVA in forum AWT / SwingReplies: 6Last Post: 07-08-2009, 12:06 PM -
color texts
By layst in forum New To JavaReplies: 1Last Post: 10-22-2008, 03:47 PM
Bookmarks