473,396 Members | 1,826 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,396 software developers and data experts.

Style changes and text in JTextPane

I have a JTextPane with several styles. The style data is loaded from/
saved to a file.

I can modify the styles at run-time and the new styles are saved to disk.
The next time the app is run the new styles are applied. What I need to
do is to have them change in the styledDocument which is currently
showing but I can't seem to make it happen. I can change the font
face/size and it changes immediately, but bold/italic and foreground don't
change. What is really odd is that I have a baseStyle which is the only
one with the font and size info, and several children. When I change font
or size, all text with a child style changes, but text using baseStyle
stays unchanged!

Can anyone tell me how to get the italic/bold/colour to change on the fly
and why the baseStyle text doesn't change its font and size?

Tony
Jul 17 '05 #1
0 2130

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: tonyg | last post by:
Hi everyone, I was wondering if there is an efficient or fast or preferred way to open text files in java. I want to load the text file into a JTextPane. The way I do it now is... ........
2
by: Csaba2000 | last post by:
The following code has me so confused, I don't even know the right questions to ask. Opera 7.01 and IE 5.5 both exhibit behaviours I don't understand while NN 6.1 seems to ignore me altogether. ...
16
by: Geoff Cox | last post by:
Hello, I publish some web pages using large fonts and would like to give the user the opportunity to print the pages using a smaller font. I believe that this is possible using different style...
6
by: dee | last post by:
Here is a a list of my hyperlinks in my home page: <A class="theclass" href="Default.aspx">Home</A> <A class="theclass" href="Search.aspx">Search</A> <A class="theclass"...
7
by: Daniel Kaplan | last post by:
I have the item below at the top of my style sheet. And it seems that the font-szie is ignored. I know that my linked style sheet is being read, and used because if I remove the font-family line,...
4
by: VK | last post by:
Is my understanding correct that due to the lack of CSS2 support Opera doesn't allow any access to inline/linked style declarations? Say in case: <style type="text/css"> ..foo { color: blue; }...
0
by: clase | last post by:
Hi everyone, I need your help! :) I need to build a widget that manages (read, write, edit) XML files. My idea is to build this new component on JTextPane; it allows to use RTM and HTML files so...
3
by: davedwm | last post by:
I have the following code which saves a Text File using a FileChooser which i believe is saving the text as 'UNICode' So when it is loaded back in, or it is opened with NotePad there are spaces which...
1
by: linksterman | last post by:
i have searched and searched to find the answer to this problem, but alas, it eluded me and i had to turn in my project without autoscrolling (which sucks since it is a chat client) i had to use...
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: 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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.