Lost in the docs again: JTextArea and EditorKit

Greetings,
As the topic title says: I lost track again in the Swing classes docs.
I'm about sure a JTextArea (as well as a JTextComponent) uses a
DefaultEditorKit, which in turn extends an EditorKit. I want that object
because it carries some nice functionality I want to use.
How, by Jove, can I get a reference to a JTextArea's EditorKit? Any pointers
or clarifications are more than welcome because I'm also sure that I'm
missing something in the MVC separation.
kind regards,
Jos

I thought I've been there but obviously I don'tunderstand the 'mechanism' of this all.
I don't really understand the mechanism either. I was confused why
JTextPane and JEditorPane have a getEditorKit() method and JTextArea
doesn't. It seems to me that the method should be defined in JTextComponent
and overriden if necessary.
Anyway I ended up searching the code to see where "editorkit" was
used. Thats my trusty fallback.You're right, I should've done that too instead of just digging into the api
docs. Sorry for saying so, but those Swing apis are quite inconsistent,
if not incomplete, at several occasions. I always come here when I get
stuck with them. Anyways, thanks again for doing what I should've done
in the first place ;-)
kind regards,
Jos

Similar Messages

  • My iPhone 5 was lost in the snow, then found and it doesn't even turn on anymore after it worked for 5 days??

    I lost my phone a few days ago when it fell out of my bag but then someone found it in the snow. Not sure how wet it was when the person found it but my phone worked fine for 5 days after. When I plugged my phone in to charge over night, I woke up with it completely shut off and I can't even turn it on. Not sure if this is a water damage issue due to the phone being lost in snow or if something else could be the case. Its just strange that it worked perfectly fine for the past 5 days and now I can't even turn it on.
    Any insight would be helpful!
    thanks

    It probably had moisture inside, and as you used it you caused the moisture to short out critical components.  You can take your iPhone to an Apple Store for diagnostics, but if the moisture indicators are tripped (and they probably are) it would need to be an out of warranty repair, or if you have it, one for the $79 Apple Care+ "incidents".  If you have to pay the full price for an out of warranty repair, that will run you much closer to $269 USD.

  • When I try to download Yosemite the icon in the doc reads "waiting" and never does anything. What can I do to start the download?

    I have a macbook pro operating on OS X software, version 10.6.8. I am trying to upgrade to the newest version (I'm clearly behind, I know) and when I click "get" in the app store the download drops into the dock and reads "OS X Yosemite--waiting" and the only option is to click "cancel download". I've restarted the download twice and restarted the computer once. I'm not sure what else to try. Suggestions?

    Try the download again. If it shows waiting, check the App Store Purchases tab for a Resume button. If there is none, let the download sit there. Sometimes Apple's servers bog down. I usually try downloading at night.

  • Lost In The Docs / Data Merge

    Hey,
    I'm trying to cook up a script that would add one of the items in my "data merge" into a text frame.
    I have the code below, and I'm trying to understand the scripting help file, but so far I was only able to output some kind of resolve(....) text.
    The "310-7251" is a name of one item in my data merge list. I want the text frame to contain it's.. um.. reference(?), the "<< 410-7251 >>" text that I would get if I did this manually, that would turn into the field's value when I would create a merged document.
    What am I doing wrong?
    var doc     
    = app.documents.add();
    var text_frame = doc.pages[0].textFrames.add();
    text_frame.geometricBounds = [
    '0pt', '115pt', '240pt', '240pt',
    doc.dataMergeProperties.selectDataSource('E:/Temp/Merge-Test.csv');
    text_frame.parentStory.insertionPoints[-1].contents += doc.dataMergeTextPlaceholders.item('310-7251').toSpecifier();

    Well, I gave up and wrote a function that would traverse all the items and find the one I want.
    With my extremely limited knowledge of the language, it seems there's a bug with the item() method; it doesn't accept field name string properly.
    Here's my code that finally worked, but I'd love to know what I was doing wrong.. Thanks.
    var doc          = app.documents.add();
    var text_frame = doc.pages[0].textFrames.add();
    text_frame.geometricBounds = [
        '0pt', '115pt', '240pt', '240pt',
    doc.dataMergeProperties.selectDataSource('E:/Temp/Merge-Test.csv');
    doc.dataMergeTextPlaceholders.add(
        text_frame.parentStory,
        text_frame.parentStory.insertionPoints[-1],
        get_field('310-7251', doc)
    function get_field(field_name, doc) {
        var fields = doc.dataMergeProperties.dataMergeFields;
        for ( var i = 0, l = fields.length; i < l; i++ ) {
            if (fields[i].fieldName == field_name) {
                return fields[i];
        alert('Error: did not find any fields with name ' + field_name);

  • Every time I open Firefox and type in a URL, I get the message "Server not found. Firefox can't find the server at..." All I have to do is hit the "Try again" button and it finds it. However, this is getting tiresome. Any suggestions on how to fix this?

    This is an ongoing issue.

    A possible cause is security software (firewall) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process.
    See:
    * https://support.mozilla.com/kb/Server+not+found
    * https://support.mozilla.com/kb/Firewalls

  • I lost my movies....they told me I had to change my security code when I bought another movies.  now I lost all the other ones.  And I cna't understand the instruction.  They are wayyyy over my head.

    oops...I wrote it all in above.  here it is again.  I bought a movie. then they told me I had to change my security code because they said it hadn't been used in long while.  so I did and now I can't find my movies from the other file.  Same name.  new code.  Whaaa..It says there are instructions somewhere but they are so far above my head I am in tears.  I don't understand a word of it..  There must be an easy way to just bring them over to new setup.  I am your grandmother so be nice.

     Account Security Team (AST) 
    Check the AppleCare number for your country here:
    http://support.apple.com/kb/HE57
    Call them up, and let them know you would like to be transferred to the Account Security Team.

  • Lost in the crack between HP and Arvato?

    Am entitled to Win 7 64 bit upgrade. Submitted order, POPs, and payment info on Aug 06.
    Arvato form shows order rec'd, POPs rec'd but waiting for validation. No shipping date. Tried to resubmit POPs, but that is not allowed. Messages to Contact Us go unacknowledged, unanswered.
    What to do?

    No prob. Just be aware that it's not MS shipping. It's a 3rd party vendor that HP hired. So it's hard to base the estimated shipping time based on past experienes.

  • I have a powerbook g4 running mac ox 10.4.11 so, im having serious issues because i have lost all the programs like office and word, and i really need to fix it because is my work  tool, how can i fix it? and i also want to know how to upgrade

    my powerbook to leopard 10.5 a least to get a better used.

    You can also use the freeware NeoOffice http://download.neooffice.org/neojava/en/index.php
    NeoOffice is equivalent to Microsoft Office. It can open Excel files, Word files & PowerPoint files. You can also create these types of files that can be opened by PC users.
     Cheers, Tom

  • Lost all my google desktop page and email access...again after using Trend Micro System Tuner

    I ran Trend Micro Titanium Maximum Security 2013 System Tuner and lost all the info, gadgets, etc. and even my email (Gmail) access. I was left with a black, blank page. I opened up Google Chrome and everything is still in place. This happened 3 days ago. So, yesterday I ran the system tuner again again as per my own comments from last year....had sorted it out by doing it. Still nothing. This morning.....I opened Firefox (21) and surprisingly had my main desktop page but still without my email. When I tried to open the email on it's own I still got nothing....the computer seemed to try to open it, but got "stuck" and the "loading" bar that goes from left to right never appeared. I could switch to the "slower" HTML version and the mail came up but prefer standard version. Checking on Google Chrome, everything is working just fine. I believe the Firefox Version 21 had only just been updated? Perhaps that is at the core. I really prefer Firefox but will have to continue with Google Chrome until this problem perhaps sorts itself out. Since it is loading properly on Google Chrome I don't want to set everything up again. Any suggestions?

    Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Hold down the Shift key and left-click the Reload button
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (Mac)
    Clear the cache and the cookies from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > Cookies: "Show Cookies"

  • I set up iCloud on pc, ipad etc was asked to copy contacts to iCloud and have lost all the settings and groups that they were in for over 2000.  Can I get it back?

    I have Outlook on my PC and thought it would be smart to have my contact in the Clouds where my ipad, work pc, home pc would be updated etc.  So I was asked I though to copy my contacts from Outlook to iCloud.  Instead it moved them and in doing so lost all the settings like Categories and reset how they are listed (used first name because have a lot of drs, phds, msws etc) now listed with last name and so I have a lot of people with md as last name.  This is an organization list and is about 2000 contacts so having to go back and fix it will be a nightmare and unnecessary work.
    Is there any way I can fix this easily instead of correcting each contact one at a time?
    Thanks.

    Restore your backup.

  • Camera problem: "Could not start the camera. Close other applications and try opening the camera again" error.

    Device info
    Your carrier: Etisalat
    Model info and OS version (Go to Settings, then Options, then about): Bold 9900, OS 7.1
    Apps and free space
    Did a battery pull fix your issue? No
    Apps installed and their version if possible: BBM, Facebook, Twitter, App world, Screen muncher.
    BT device model/version (you will have to look at the BT device): (Sorry, don't know what this is).
    When writing your question
    Any other details that would help us out with your issue:
    Good description of what is really wrong and how to reproduce if possible. Details of what you did before:
    What is worth a thousand words
    I simply open the camera and a pop up saying "Could not start the camera. Close other applications and try opening the camera again" appears and only lets me press okay. 
    Memory seems to be okay, can't figure out what it may be.
    Please, how can I fix this? Any help is appriciated.

     I had the same problem with my Bold and tried everything until out of frustration i just clicked the center picture taking button before the "Could not start the camera. Close other applications and try opening the camera again" message came up and believe it or not that solved the problem. Works fine now!

  • Doc Save As and Trusted Function

    I have been reading over the forum and the adobe help files regarding this. I think I am close but since I need to get my IT department to assist in placing the js files where they have to go, I thought I might ask the forum if I am on the right track
    I still have to make sure the field values will not include an illegal characters. They wont be empty as the forms will be coming directly from our system -prefilled
    Currently these forms automatically email (although staff still have to hit the actual send button) when staff go to print the document.  The people who get these forms are just finding it a bit hard to keep up with the emails and have asked to just have the files save to a folder so they can look at when they have time
    This is what I have for my trust propagator function.  I assume this is the only js file I will need as it incoporates the trusted function?
    mySaveAs = app.trustPropagatorFunction(function(doc,path)
      app.beginPriv();
       doc.saveAs(path);
      app.endPriv(); })
    myTrustedSpecialTaskFunc = app.trustedFunction(function(doc,path)
      // Privileged and/or non-privileged code above
      app.beginPriv();
       mySaveAs(doc,path);
      app.endPriv();
      // Privileged and/or non-privileged code below });
    I got this code from the Adobe Help
    then I want to have this code in the Document Did Print area
    var name = this.getField("FormValues.accountNames_0").value
    var folio =this.getField("FormValues.folioNumber_0").value
    myTrustedSpecialTaskFunc(this, "/w/Public/AccountOpening/" + name + " " + folio,pdf);
    I have to read where to put the js file as I have seen some comments on the forum that where you place the js file has changed for those with Adobe X and Windows 7
    Would anyone be be able to let me know if I am on the right path before I get IT involved.  I suppose I could test the code on my own laptop to see if it would allow me to save the form.....
    Thank you

    Read this: The Acrobat Ninja: Acrobat 10.1.1 JavaScript changes
    You have to manually create the folders that aren't present, and they must be named correctly.
    It's a good idea to use the valueAsString property instead of the value property to get the field values, since you're using the results as strings. It probably won't make a difference here, but it's a good habit to get into. You also have a typo in that last line of code. It should be:
    myTrustedSpecialTaskFunc(this, "/w/Public/AccountOpening/" + name + " " + folio + ".pdf");
    It would be a good idea to make sure those field value aren't blank if there's a chance that they could be.
    Also, consider using a try/catch block for the doc.saveAs call, and look at the return value so you can give the users a more helpful error message than what the default will be if something goes wrong.
    If you need help with any of this, post again.

  • How can I make an invalid dynamic disk Array available to the OS again

    Hello Storage Pros
    The setup
    I have a Promise VTrak E610f head unit with 2 VTrak 610j expansion units attached to it together giving me over 27 TB of usable storage space.
    At the hardware level I slip the storage into 6 parts containing 7
     1TB disks and had the parts  configured into 6 RAID 6 arrays. In the end; each of the 6 arrays gives me 4.6TB of usable storage space.
    On the OS level, I have the storage attached to 2 servers: Windows server 2008 and windows server 2008 R2 over a Qlogic fiber channel switch. Each of the 6 arrays are viewable as basic disks of 4,6Tb which I went on to configure as a single RAID 0
    spanned volume of 27TB and for that all the disks had to be converted to dynamic.
    The problem
    Now comes the problem: On my first attempt to do a firmware update on the VTrak E610f storage; all the volumes were rendered foreign and I had to import them to be able to use them. Although the import was successful, I lost all the set NTFS permissions
    and SMB share and I had to manually reconfigure them. Upon doing so The OS registered some inconsistencies in the storage and recommended that I ran chkdsk. Since the storage is that big I reluctantly complied and restarted the server.
    The first server was restarted BUT chkdsk did not commence as scheduled, the server powered right up. After logging in to inspect; I discovered - to my surprise, that the disks were now shown as invalid in Disk Manager and were no longer visible to
    the OS. Assuming that maybe a restart of the other server and the storage would set things right, I went ahead to do so but to no avail. After rebooting the entire system (including the storage), the other server also displayed the disks as invalid and were
    no longer visible to the OS as well.
    My question is; how can I make the disk available again from this ‘invalid’ state without losing data?
    What I tried but did not help:
    Taking the disks offline and then online again did not work, after the disks were online again, they still appeared as invalid.
    Reactivating the disks threw an error “operation not allowed on an invalid disk pack”
    Calling support of the storage manufacturer: they did not find anything wrong with the system, after 5 hours we had to stop.
    I fear converting the array from dynamic to basic will destroy all the data.
    HxD is showing no errors in the disks
    If there is any expert out there with helpful tips; your assistance will be greatly appreciate.
    Cheers
    John

    Hello  Shoan
    Thanks a lot for your response and tips. Sorry I could not get back to you in good time for I had to run some of the tests you provided, it took some time to
    thoroughly re-test the system.
    The summary
    The initial firmware upgrade attempt forced 3 disks offline and the other 3 became foreign. I had to re-import them to have access again. after re-importing
    the disks I realized  all NTFS permissions and SMB shares of the folders on the disks had disappeared, but at least the disk was visible and accessible at that point - but not fault free. It was recommened that I let chkdsk run. However rebooting the
    system to allow chkdsk to run did not result in chkdsk running, instead chkdsk did not run and after restart, the OS showed the disks as invalid. And that is still the case now.
    Response to your questions:
    Yes the storage array was (and is still) connected to another server 2008 R2 server when the problem occurred. The second server is also displaying the same problem: the disks are shown as invalid.
    The loss of SMB shares and NTFS permissions occurred after the initial firmware upgrade attempt, some disks (3 out of 6 of them) were forcibly offlined and the other 3 were, suddenly, marked as foreign. In the end, and to have access to the disks
    I had to online the offlined 3 disks and then reimport the rest of them. From the way I understand it, if the upgrade was not the cause, then at least it was the trigger.
    In as far as converting disks from dynamic to basic, I was not in luck so far:
    Three of the companies I have contacted (recommended by promise Technology technician) so far only work with smaller disks like 2TB, 27 TB like I have is so
    far too big.
    I’m not sure converting the disks to basic will help much though, since that would break the single 27 TB volume which the OS was working with into 6 individual
    disks of 4.6 TB. Will I be able to get the data back that was written to just one volume from those 6 individual and unrelated disks?
     Above all, I have connected the RAID storage system to a newly installed Server 2008 R2, the disks are also shown as invalid.
    I have spent more than 17 hours in remote sessions with a Promise Technology technician trying the resolve the issue. From the technician’s side all seems in place with the exception
    that the disks are invalid in the OS.
    I have contacted Microsoft Customer Support service with the issue. Given that Microsoft did not manufacture the storage unit, can they help at this point – or am I better off
    putting my hopes else?
    Your help is always appreciated and again, thanks for your response and advice.
    JohnV

  • What is the difference between "bootable" and "restorable?"

    I am using Carbon Copy Cloner to backup my iMac hard drive.
    I realize that I don't really know what "bootable" means and how it differs from "restorable" - - can you please clarify?
    1.  If a backup on an external drive is bootable, does that mean your iMac should be able to see the backup once the external drive is connected, and you should be able to access the docs on it and move some or all of them back to your iMac, but you can't use it to start up your iMac in case the iMac crashes? 
    2.  If you do a backup to an external drive and the backup is supposed to be restorable, does that mean you can use it to restore your whole operating system and all the apps and docs back onto your iMac in case it crashes?  But you can't just cherry pick and copy one document on it to move back to your iMac?
    Or something else?
    Thanks.

    If you are using Carbon Copy Cloner to back up to a disk image (e.g., sparse bundle), that disk image itself is not bootable, as CCC will warn you. However, CCC can use the image to restore a bootable system to a hard drive. If you clone your current system to a volume or partition on another drive, rather than to an image, the volume or partition will be bootable.

  • Changing the Color of Crop and Bleed Marks from Registration to Black

    Hello all,
    I have been searching the web and have tried numerous things but I can't seem to solve this problem.  In InDesign crop marks and bleed marks are printed in "Registration" color.  I understand why that is needed for plate printing.  However I am laser printing and I need those marks to be in "Black" color.  I have tried to edit the cropmark script by changing "Registration" to "Black" on the line with myRegColor.  I have tried changing the printer setting to "Pure Black".  However I can't get the crop and bleed marks to print in "Black".   I have been on various websites and while there are people asking the question I haven't found a answer that works.  I have searched this community as well but haven't found an answer that I understand.  Before I manually make crop marks I want to make sure I am not missing something completely obvious. 
    With laser printing there is a different charge for color and B&W.  The fact that the crop marks are coming in as color and not black means B&W pages are counted as color in the printing cost.  I have tested the same docuement (which was just one page full of sample black text) with and without crop/bleed marks.  When the document is printed without the marks the printer clicks as a B&W page.  When it is printed with the marks the printer click as a color page. 
    I am creating the doc in InDesign and exporting to Acrobat for printing.  I am using Creative Cloud so I think I have the most up to date version of InDesign.
    Any help would be much appreciated.  Thanks.
    -TS

    With CS6 or later you can export to grayscale and in that case the crops will be black only. Like this:
    You should set your Appearance of Black to Rich black otherwise 100% black CMYK might export to something less than 100% grayscale. When you check the PDF in Acrobat set the simulation profile to the grayscale profile you export to.

Maybe you are looking for