How can I get informations of a char in a JTextArea

I read a String from a JTextArea. After this I want to know
what kind of char (like bold,italic,underline etc.) i have.
I walk true the String with an for(i=1;i<Stringlength();i++)
and read each character of this String.
To generate a HTML-File I need Informations about the
settings of the character.What can I do ???
greetings povray

Like many other APIs, Swing separates the data from the view. The JTextArea has an underlying Document object made up of Element objects. Walking these Element objects can get you the AttributeSet(s) which define font etc.
see
javax.swing.text.Document
javax.swing.text.Element
javax.swing.text.AttributeSet
I recommend you search java.sun.com and the web for examples of how this works.

Similar Messages

  • How can I get information off my old hard drive?

    Recently my old mac book died. The genius bar said that it would be 750$ for repairs and since it had been 5 years since I'd gotten the laptop, I opted to buy a new MacBook Pro. The problem is I have stuff on my old hard drive that I want to keep (mostly the pictures from my iphoto), so the genius bar took the hard drive out for me. So now I have the hard drive from my old laptop and I'm not sure how I get the information off of it.
    I tried to look it up online and saw something about a hard drive caddy? I have no idea what these are/ how they work. Do you just put the hard drive inside of it and connect it with a usb chord? Are all of these compatible with the macbook hard drives and will it work with my new macbook pro?
    Or could/should I just go to best buy or something to see if they could put it on a CD for me?
    What are my options/how can I go about getting the information from the old hard drive onto my new laptop?
    Thanks!

    You want to buy an enclosure that will accept a 2.5" IDE hard drive(I think that is what your computer probably had). Once you put the old hard drive into the enclosure, just connect it to your new computer using USB or Firewire(if the enclosure has Firewire ports) and copy your stuff over.
    Now is a GOOD time for you to buy another external hard drive and back up your new computer to it often. This will save you the trouble of recovering your information in the future. It is always recommended that you back up your important files to several places.

  • HT1349 what´s the number serie of the iTunes cards? or how can i get the serie number of an iTunes card? and how can i get information in spanish? HELP!

    Hi!
    i need help, i lost the code of my iTunes card, (it can´t see, it´s illegible) do you know where can i find information in spanish? or how to get the code again?
    it´ll be very helpful your help
    Thanks

    Copy the iTunes folder from the old computer to your new one.

  • How can I get informations about PATH variable ?

    I have a programme installed on my computer and I need informations about its path. For example I can get Java home path like this:
    System.getProperty("java.home");, but how can I do that for my programme.
    If you know another way I can do this please let me find out.
    Thanks !

    To sergey35:
    Thanks! This work very well.
    Now I want to launch an application from java, but I don't know how can I test if my application exists (is installed).
    For example if I want to launch winamp or any other application, but how can I verify if my application exists indeed. The end user isn't interested if my application really exists. He push a button and he wants to launch that application. If it doesn't exists I have to notify through a message this fact. And most difficult I think is to know exactly the path where is installed that application.
    If anyone can help me with documentation or suggestions please reply to this thread.
    Thanks!

  • How can I get information of the switched channel in an example program from NI?

    When I use the example program "niSwitch DMM Switch Synchronous Scanning.vi", I'am not able to get any information, wich channel is active. Wich block has to be used and how must I connect it to see this.
    The other one is, that te sytax for the scan list, described in the help does not switch through the channel, how has this to be modified?
    Im using a SCXI 1128 in Slot 8 of a 1052 combo chassis and the DMM is a PXI 4070 in the Slot 2.
    Attachments:
    niSwitch DMM Switch Synchronous Scanning.vi ‏145 KB

    Bigmatzeman,
    finally, i got a working solution which should suite you!
    Ok, here is what you have to do/what is missing in your setup:
    First, you can leave the modules as they are already inserted in your chassis.
    Second, you will need a special AUX-cable to synchronize the DMM and the switch. You can find infos on that here
    in the section "Single Module Scanning". Connect the cable between the
    DMM and the front connector of the switch (1331, scanadv. and
    externaltrig.)
    Third, i advise you to use the HV8-BAN4-cable to connected the signals
    to your DMM. This is because the cable is specified for the appropriate
    voltage the DMM and the switch are capable of (300 V). The connection
    of the HV8 can be done in the 1052 above the PXI-slots.
    And at last, open the example "niSwitch DMM Switch Handshaking.vi", set
    the devices to the appropriate identifiers. Select for both triggers
    for the DMM "External" and for both triggers of the switch "Front
    Connector". Change the Scanlist to "ch0:5->com0;". If you are using
    the HV8-BAN4 instead of direct front connector-connection, you have to
    change the code a bit, too: insert a "niSwitch Connect Channels" VI in
    front of the "niSwitch Configure Scan Trigger" which connects "ab0" and
    "com0".
    Ok, now the example should work correctly and you should be able to use all other SCXI modules together with your 6281.
    Hope this helps,
    Norbert
    [Edit]: My setup was 4072, 6052E, 1127 and 1011 (instead of 4070, 6281,
    1128 and 1052 as you do). But that should work just the same way.
    Message Edited by Norbert B on 08-04-2006 10:36 AM
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How can I get information of all the sessions opens for my application

    I have a record of all sessions ids created and what I need to know in certain circunstances if the session is still alive comparing by session id
    I hope you can help me.
    Thanks.....
    Edited by: Daniel Almaguer on 23-may-2012 11:28

    in weblogic console.. Go to Summary Of Deployments.. and select the Monitoring tab -> Web Application..
    This will give you these information for the particular application
    Context Root Sorted Ascending      State      Active Server Count      Source Information      Current Sessions      Maximum Sessions on Any Server      Total Sessions

  • How can I get the number of chars in a String, without countig the Spaces?

    When I do String.length(), he returns the length with Spaces, but I want the number of chars and numbers.
    thx

    I'm afraid you'll need to write a method of your own for that. It's very simple fortunately:public static int getLengthWithoutWhitespace(String s) {
        java.util.StringTokenizer st = new java.util.StringTokenizer(s, " \t\r\n");
        int counter = 0;
        while (st.hasMoreTokens()) counter += st.nextToken().length();
        return counter;
    }This code is not tested... Here's another, a bit more reliable approach that simply passes through the characters of the string:public static int getLengthWithoutWhitespace2(String s) {
        int counter=0;
        for (int i=0; i < s.length(); i++)
            if (Character.isWhitespace(s.charAt(i))) counter++;
        return counter;
    }

  • How can i get information off of my flash drive using the iMac?

    when i insert the thumb drive in the computer, it doesnt recognize the new hardware. i also do not know how to open the flash drive manually. Please help!

    Godsblessings0625 wrote:
    i also do not know how to open the flash drive manually. Please help!
    Unless you are 100% sure about what you are doing, don't try to open a flash drive as it the best way of destroying it.

  • HT204088 how can I get information about getting credit toward a purchase of a new ipad by turning in an existing one/

    Can I trade the iPAD 3 G that I have towards the purchase of a mini retina

    You can either use Apple's recycling program if they offer that in your country or sell it to someone other than Apple.
    (103987)

  • How do I get information about filing a claim for kids purchases

    How can I get information about making a claim for kids unauthorized purchase?

    I have seen nothing formal from Apple though I have read they are open to discussions about the matter.
    If it is an individual instance, there is a  section on the purchase receipt that invites you to report a problem   Report the purchase and the circumstances.
    However, if it is a recurring problem you would have been expected to utilize the parental control features.

  • How do I get information on a mac laptop based on the serial number?

    I am looking at some on line public surplus auctions for macbooks. Some Pro some iBook etc. They don't give you much information about the item other than what it is (no tech specs) and some photos of the actual item. How can I get information based on the serial number?

    This web page will help. Enter the last three digits of the serial number in the empty field:
    http://everymac.com/ultimate-mac-lookup/?search_keywords

  • How can I obtain information about the recently finished commands?

    How can I get information about the recently finished jobs / bash commands? (eg. date / time of termination)

    $ e echo foo
    foo
    $ type e
    e is a function
    e ()
    $@ && echo $@ - $(date) >> test.txt
    $ cat test.txt
    echo foo - Wed Jan 1 12:10:54 CET 2014
    $ e echo bar
    bar
    $ cat test.txt
    echo foo - Wed Jan 1 12:10:54 CET 2014
    echo bar - Wed Jan 1 12:11:09 CET 2014
    $ e htop
    <here I do something with htop for a little while>
    $ cat test.txt
    echo foo - Wed Jan 1 12:10:54 CET 2014
    echo bar - Wed Jan 1 12:11:09 CET 2014
    htop - Wed Jan 1 12:15:14 CET 2014
    Last edited by karol (2014-01-01 11:20:36)

  • How do I get information about new legal requirements?

    Hi
    We are 4 people in a company that has 39 active company codes in about 25 countries. How can we subcribe to whenever SAP releases new reports that meets legal requirements in specific countries? Some of our companys have their bookkeeping taken care by a neighboring country, so the bookkeepers would not know if there is a new report released from SAP. So how can we get information about new reports without having to read throug all the release documentation?
    Hope you can help
    Jens Bald
    IC Companys
    Denmark

    Hello Jens,
    this is a real problem.
    What is my experience? The first priority is: try to use the SAP Standard as far as possible. No user-defined reports, no exits. Try to be always up to date with hotpackages.
    A further help for me are the userforums here. If you have five minutes left, just have a look at all the questions and answers.
    I know, there is a lot of stuff to read, but the releasenotes have to be checked. Unhappily I didn't find another way.
    Sometimes SAP reacts just in time regarding new legal requests - and I can understand this. At least I have to say: It is not possible to manage this without having any support from the accountancy side. This enables you to search for this requests - instead of reacting.
    If a country changes statutory requests regarding taxreporting or new taxtypes, changing of rates the guys from local accountancy ought give you a hint. Because they get this information at first.
    I made good experiences with internal accounting forums or user groups (i. e. northern countries, westeurope, USA, southeurope). 
    Maybe it gives you a little help and I am very interested in all the answers to this thread.
    Best regards
       Horst

  • I just pressed the wrong button to erase of my IMac, how can I get back all information from my computer ?

    I just pressed the wrong button to erase of my iMac, how can i get back all information ?

    Possibly through a data rescue service (can cost a four-figure amount) if you didn't have an external backup.
    But you must stop using that Mac immediately, or your data will be over-written.

  • My iphone is broken,and i came to store to change a new one today. When I come home, I found I lost my backup and may be mistake is made during before backup.The information in my previous iphone is really important for me? how can I get the backup back?

    my iphone is broken,and i came to store to change a new one today. When I come home, I found I lost my backup and may be mistake is made during before backup.The information in my previous iphone is really important for me? how can I get the backup back?

    If you don't have a backup then the only possible solution is to go back to the store and see if they can get your old phone and create a backup of that. I know very often that Apple employees will wipe the returned iPhones clean before shipping them back to wherever they ship them.
    When you say your old phone was "broken" does this mean it is dead and won't turn on?
    Do you have a Time Machine backup of your computer, or a clone that might have this info on it?
    Other than that I hate to say you may be out of luck. Time Machine and/or a cloning program performed regularily will inevitably save your a** in situations like this.
    Good luck
    PM

Maybe you are looking for

  • Interactive pdf form in InDesign repeat text field

    I am working to create an interactive pdf form. The name field needs to be displayed several times. I would to create form in such a way that once the user enter the name once, the same name is used in all other places. Please help.

  • Unexpectedly quit on Opening - Have tried reinstalling

    Hello. I'm really at a loss as to what to do. Every time I open Logic it opens for a second then unexpectedly quits. I've tried reinstalling, tried updating the application support, tried opening without my interface...Can anyone help me?

  • ADF Table problem !

    hello Oracles; i am using the JDev 11 to create an ADF Application, which allows me to display in a ADF table for a Product Table From the DB (using Oracle XE) i managed to display the table in the page with a form to make some changes in it. BUT the

  • Easily relocate layers in layer-heavy PSD!

    All serious Photoshop users have endured the frustration of needing to move layers around in a PSD chocked full of layers. There's no easy way to do it. And there's no excuse for this. I am posting here in order to raise support for and to get Adobe'

  • Is there a way to combine two iTunes account?

    I would like to combine my iTunes account with my husbands account. Is there a way to do this?