| | |
setting font of selected text
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jun 2004
Posts: 2,108
Reputation:
Solved Threads: 18
I know how to se the font of a regular JTextArea, but how would I get an reference to the selected text and only select that?
Here is what I have so far:
this works but changes whole area
this doesn't work, and this is what I need..
How can i do this/
Here is what I have so far:
Java Syntax (Toggle Plain Text)
setFont(new Font(font, style = Font.BOLD, size));
Java Syntax (Toggle Plain Text)
textArea2.getSelectedText().setFont(new Font("sansserif",Font.BOLD, 12));
this doesn't work, and this is what I need..
How can i do this/
![]() |
Similar Threads
Other Threads in the Java Forum
- Previous Thread: jsp tutorial
- Next Thread: Calendar Help
| Thread Tools | Search this Thread |
Tag cloud for Java
addressbook android api apple applet application arguments array arrays automation binary bluetooth button calculator chat class classes client code columns component converter database draw eclipse error errors event exception file fractal ftp game givemetehcodez graphics gridlayout gui helpwithhomework html ide image inetaddress input integer j2me japplet java javaprojects jme jmf jni jpanel julia link linux list loop map method methods midlethttpconnection mobile netbeans newbie number objects openjavafx oracle php print problem program programming project projects recursion rim scanner screen server set signing size smart sms socket sort sql storm string support swing test threads time tree unlimited variablebinding webservices windows






