ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Nested Classes, Part 1
Subject:   nested classes in swing components
Date:   2006-02-10 13:37:32
From:   mrodent
hi,
Found my way to yr site after repeated postings in the swing part of the java forums failed to produce an answer to this: in a JTextPane, using styled text (i.e. with attributes such as bold etc.), going Ctrl-C (copy) on a selection actually turns the styled text into plain text in front of your eyes! The culprit here is StyledEditorKit.StyledTextAction, a nested class, which somehow has to be overridden. Nor is it the first time I've encountered a need to get on top of these mysterious nested classes - they're everywhere, and I personally dread finding myself having to use one... but only because I can't (like you say) find a source of info about how they work and above all how to manipulate them. Your contents doesn't seem to cover swing nested classes specifically... maybe you need to write a whole new book called "hard core swing nested classes"???
Only joking. Will probably buy yr book anyway... any tips about my styledtoolkit prob?