Using StyledLabel as a renderer for a JTextField

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Using StyledLabel as a renderer for a JTextField

Postby rogergl » Mon Oct 26, 2009 4:53 am

I would like to use the styles from a StyledLabel for the text in a JTextField. What would be the best solution to do this ? Write my own highlighter and draw the content of the StyledLabel inside the paint method of the highlighter ?

Regards
Roger
rogergl
 
Posts: 1
Joined: Mon Oct 26, 2009 4:04 am

Re: Using StyledLabel as a renderer for a JTextField

Postby JIDE Support » Mon Oct 26, 2009 7:23 am

There are two separate components. It is not possible to use StyledLabel inside a JTextField, just like there is no way to use JLabel inside a JTextField. You may give JTextPane a try which supports styling.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 74 guests