DocumentEvent and DocumentListener can someone explain?

Hi there!
I'm trying to use the DocumentEvent and DocuementListener interfaces;
So far I'm not seeing much happening, I added the DocumentListener interface to my JEditorPane:
     text_chat.getDocument().addDocumentListener( keyThis );And I'm looking for all changes made to the Document so I think this is correct from the Class that implements the interface?
    //Method from DocumentListener
    public void changedUpdate( DocumentEvent e ) {
        e.getDocument();
        String s = e.toString();
        System.out.println( s );
    }But it doesnt print anything!!
I want to take all DocumentEvents and pass them to another client so I guess I need to do some serializing but it this possible?
Thanks

I think you need to read the DocumentListener API again. The changedUpdate() method is for changes in attributes, not insertion/removal of text.

Similar Messages

  • Java and ML - can someone explain?

    In my total ignorance of Java, can someone please explain what, if anything, should be installed in 10.8.3?
    If I go to java.com, it says I don't have Java installed and the 'Missing Plug-in' graphic shows.
    I've seen all sorts of stuff about Java 7, Java 6, install/don't install, etc.
    Can anyone give me a short answer to Java's position in 10.8.3?
    Thanks.

    Java is not installed by default with Mountain Lion. This is because it has some serious security issues. So if you don't need it, it is best not to install it.
    If you do need it, whatever wants to run it will complain & the OS will give you an opportunity to install it (via an Internet connection), or you can install it from the Java site.
    Note: don't confuse Javascript with Java. They are two different things.

  • CSS weirdness with dd, dvdbackup, and mplayer -- Can someone explain?

    Just wondering if someone could explain what's going on in the following circumstance.  This doesn't happen for all CSS-encumbered DVDs, but I can reproduce the pattern for DVDs that it does happen to.
    dd if=/dev/sr0 of=~/somefile bs=2048
    dd cuts off with an error at around the 4MB mark.
    mplayer -dvd-device /dev/sr0 -identify -frames 0
    dd if=/dev/sr0 of=~/somefile bs=2048
    dd now completes
    mplayer -dvd-device ~/somefile dvd://n
    the video is messed up
    dvdbackup -i /dev/sr0 -o ~/somedir -n somename -M
    mplayer -dvd-device ~/somedir/somename dvd://n
    the video is still messed up
    mplayer -dvd-device /dev/sr0 dvd://n -frames 60
    This seems to be the magic trick
    dvdbackup -i /dev/sr0 -o ~/somedir -n somename -M
    mplayer -dvd-device ~/somedir/somename dvd://n
    Now works.
    dd if=/dev/sr0 of=~/somefile bs=2048
    mplayer -dvd-device ~/somefile dvd://n
    Still messed up.
    Last edited by BrainwreckedTech (2011-10-03 17:43:32)

    Thank you Dr but the following is true:
    I placed this code in the for loop before I posted the question :
    for (int i = 0; i < numSpanTags; i++) { // Loop falls through here!
          System.out.println("Span tag (" + i + ") = " + spanTags.item(i));
    }And I receive 29 (The correct number) of non-null references to objects (Node objects) in the NodeList.
    When I replace the exact same for loop with this code :
    for (int i = 0; i < numSpanTags; i++) { // Loop falls through here!
          System.out.println("Span tag (" + i + ") = " + spanTags.item(i).getTextContent());
    }Nothing prints. This discussion has never been about "clever means to suppress exceptions" it has been precisely about why a loop that has the
    exact same references, exact same indices prints one time and doesn't print the other and does not throw an exception. If you can answer
    that question then I am interested. I am not interested in pursuing avenues that are incorrect, not understood and most importantly shot from the hip without much thought.

  • Can someone explain how to set up an administrator account so that I can have my phone and my daughters have separate apple ids?

    I mistakenly updated to the latest version of iOS and ever since then I can send messages to my daughter and I receive them but she does not.  She has an iphone also and her phone is under my apple id also.  Someone told me that I could set up an Administrator Account so that she can still be under my account but she has her own ID and that will fix the problem with text/imessages.  I can't find anything on the website that explains how to do that.  Can someone explain that to me?
    Thanks!

    I'm still not clear on what you are trying to accomplish. If you have an iPhone and she does as well you should have your own Apple IDs.
    If you want to pay for any purchases she makes with her phone as far as apps/music goes than that is what Family sharing is for.
    In my case my Wife and I are setup for family sharing. When she purchases music/apps it charges my credit card. This setup also allows me to share my past music/app purchases with her and vice versa.

  • I have downloaded ios 5.1.1 and the wifi has stop working or it would stay on for less then 20min its only 9 months old can someone explain what is happening and if some know how to fix it

    I have downloaded ios 5.1.1 and the wifi has stop working or it would stay on for less then 20min its only 9 months old can someone explain what is happening and if some know how to fix it

    I have taken it back to the Apple store genius bar, but they say they don't see anything wrong. Well unless you use it all day and experience the problems when they happen, you wont see anything wrong. But there are lots wrong with it. But this would be the same store as I purchased the phone. And they backed up my old Iphone 4, but were not able to get anything to load back onto my new phone. So, I lost pretty much everything. But over time, some of my contacts have started showing up, although i am still missing over 800 of them.

  • Can someone explain what DHCP is and how I do I connect to WiFi  hotspot?

    Can someone explain how a wireless network/router with an internet connection allows computers with a wireless card to connect to the internet? For instance, In an internet cafe with WiFi, how does my macbook get the IP address for the ISP that the cafe uses to allow me to open a webpage with Safari? What is DHCP and how should I set my internet preferences to allow me to use a network other than my own.
    The reason I ask so many questions is that I can connect to the internet with my Airport Express base station network at home but not in my local WiFi cafe. Can see the network but not connect.

    Most Internet Cafes utilize DHCP to dynamically provide a wireless client with an IP address for that session. DHCP is a protocol used by networked computers (clients) to obtain IP addresses and other parameters such as the default gateway, subnet mask, and IP addresses of DNS servers from a DHCP server. It facilitates access to a network because these settings would otherwise have to be made manually for the client to participate in the network.
    You Mac's AirPort, in turn, is set up to be a DHCP client by default. This allows your Mac to accept the dynamically provided IP address information from the Internet Cafe's DHCP server.
    The reason I ask so many questions is that I can connect to the internet with my Airport Express base station network at home but not in my local WiFi cafe.
    It sounds like the AirPort settings that your Mac is using is no longer at their default settings...and my be the reason you cannot connect to the Internet at the Cafe...or, the Cafe has additional settings required. I suggest that you check with the Administrator of the particular Internet Cafe you're having trouble connecting with to find out what settings are necessary to use their wireless network.
    A typical AirPort is set up as follows:
    System Preferences > Network > Show > Network Port Configurations
    - Verify that AirPort is "On" (checked)
    - Verify that AirPort is at the top of the list. If it isn't, you can drag it to the top.
    Systems Preferences > Network > Show > AirPort
    AirPort tab
    - By default, join: Automatic
    TCP/IP tab
    - Configure IPv4: Using DHCP
    - Configure IPv6: Automatically or Off
    Proxies tab
    - Configure Proxies: Manually
    - Select a proxy server to configure: <All proxies should be unchecked unless you specifically require a proxy for Internet access.>
    - Exclude simple hostnames (unchecked)
    - Bypass proxy settings for these Hosts & Domains: <leave blank>
    - Use Passive FTP Mode (PASV) (checked)

  • Can someone explain purchasing, activating and signing up for iPhone.

    Hi, iPhone hits UK in November and I'd like to be prepared. Can someone explain to me how it's going to work. In the USA where do you buy the phone - the Apple store, and what do you do just walk in a buy the actual phone as if it were an iPod? And then how does activation work? What is it, just registering the iPhone with Apple or signing up with the network provider? What stops you from just buying the phone and putting another AT&T or O2 sim in and not signing up for one of the contracts?

    Presuming that it will look pretty much the same as it did for US customers, it will be something like this..
    You walk into your local Apple store and purchase an iPhone, or you can order one through the UK online Apple store (or, presumably, O2 will sell them in their local shops).
    You connect the iPhone to any computer which meets the minumum system requirements. It will recognize a new, unactivated iPhone and take you through the activation, which includes:
    1. Entering your name, address, and payment info
    2. Create an iTunes Music Store account if you do not already have one
    3. Select which type of call plan you want (how many call minutes, how many text messages, etc)
    4. Specifying whether you want a new number assigned or want to port your number from another provider (assuming this can be done in the UK)
    You will then wait while the activation is completed, which can take several minutes. Once your phone is activated you will be able to make calls, send text messages, and use all the other functions of the iPhone, including syncing your contacts, calendars, and music to it. If you are porting a number from another service, once the port is complete you will be able to receive calls. If you are being assigned a new phone number, you will be able to receive calls right away.

  • Cffunction and how to ? can someone explain the code to me line by line

    Hello i went to get this online and i want to test it.
    the udf is supposed to
    * CSVFormat accepts the name of an existing query and
    converts it to csv format.
    * Updated version of UDF orig. written by Simon Horwith
    my question how to break it down.
    can someone explain the code to me line by line
    thanks

    silviasalsa wrote:
    > thanks
    >
    > but line by line
    >
    > what is
    > if(ArrayLen(Arguments) GTE 2) qualifier = Arguments[2];
    > if(ArrayLen(Arguments) GTE 3 AND Len(Arguments[3]))
    columns = Arguments[3];
    > returnValue[1] = ListQualify(columns, qualifier);
    > ArrayResize(returnValue, query.recordcount + 1);
    > columns = ListToArray(columns);
    > for(i = 1; i LTE query.recordcount; i = i + 1)
    > {
    > rowValue = ArrayNew(1);
    > ArrayResize(rowValue, ArrayLen(columns));
    > for(j = 1; j LTE ArrayLen(columns); j = j + 1)
    > rowValue[j] = qualifier & query[columns[j]]
    & qualifier;
    > returnValue[i + 1] = ArrayToList(rowValue);
    > }
    > returnValue = ArrayToList(returnValue, Chr(13));
    > return returnValue;
    > }
    >
    > thanks
    Apparently this UDF takes two optional parameters so that one
    can define
    (A) a text "qualifier" to use in the CSV file, this is
    usually the
    single quote|tick ['] mark - but sometimes one wants this to
    be a
    different character and (B) what columns to use in the
    output in case
    one does not want to use all the columns in the record set
    in the
    outputted CSV file.
    The if statements are checking for these optional parameters
    and if
    found setting the values in them to internal variables.
    These
    variables are then used in the rest of the logic to create
    the CSV output.
    HTH
    Ian

  • Can someone explain the icloud to me please? Where are all my old pictures and how can I see them? Photostream only holds 1000 and when I sync my icloud to my mac it only imports what is on my photo stream.

    Can someone explain the icloud to me please? Where are all my old pictures and how can I see them? Photostream only holds 1000 and when I sync my icloud to my mac it only imports what is on my photo stream.

    When you enable photo stream on your Mac, in imports photos currently in your photo stream.  However, photo stream only keeps photos for 30 days, even though up to 1000 photos will remain on your device until you delete them.  When you enable photo stream on your Mac, you will only receive photos added in the last 30 days, as the others are no longer in your photo stream.
    If you want to get all your old photos on your Mac, save them to your camera roll (if they aren't already there) by opening your photo stream album, tapping Edit, tap the photos, tap Share, tap Save to Camera Roll.  Once they are in your camera roll, import them to your Mac as explained here: http://support.apple.com/kb/HT4083.
    Another option would be to create a shared photo stream containing the older photos and invite yourself (as explained here: http://help.apple.com/icloud/#mmc0cd7e99).  Then check Shared Photo Streams in iPhoto>Preferences>Photo Stream and you will see this shared photo stream on your Mac.

  • Sometimes, my iPhone displays a "E" instead of "3G". Can someone explain me why and what it means ? Thx for ur help !

    Sometimes, my iPhone displays a "E" instead of "3G". Can someone explain me why and what it means ? Thx for ur help !

    You are connected to an EDGE network. See page 17 in the "Basics" section of the User Guide.
    http://manuals.info.apple.com/en_US/iPhone_iOS4_User_Guide.pdf

  • Can someone explain me the difference between iCloud Photo Sharing, My Photo Stream and iCloud Photo Library?

    This is very confusing. Can someone explain the difference between these 3 options in Photos app.
    iCloud Photo Sharing, My Photo Stream and iCloud Photo Library.

    iCloud- My Photo Stream FAQ
    iCloud- My Photo Stream and iCloud Photo Sharing limits
    iCloud- Using and troubleshooting Shared Photo Streams
    Your iPhoto Library is located in your /Home/Pictures/ folder and contains all the photos you have put into iPhoto. iCloud Photo Library is the library of photos you have stored in iCloud.

  • Please can someone explain how to delete email addresses?  I have people who when I type in their name it comes up with the correct email address but then when you hit return to confirm it promptly changes the name to someone else (always the same someone

    Please can someone explain how to delete and email address that when typed in brings up one name but when you hit return to confirm it jumps to another name.  I can't find them in my contacts list but they do come up when you type the first few letters of a name.
    EG If I type xyz and the name of the person comes up, when I press return to confirm that's the one I want then it jumps to [email protected],  always the same def address.
    I can't fathom it out.
    Thanks
    Terri

    Try this:
    Start a new email.  In the To address bar, type in xyz like you normally do, press return to confim, and when the address you want to remove shows up in the address bar, move your cursor over the address you want to delete.
    A small triangle next to the name will show up.  click on it, a drop down menu will open, click Remove from Previous Recipients List.  Then do the drop down menu again and Remove Address.
    Good luck.

  • Trying to understand RSTP - Please can someone explain this?

    Hi Group
    I am still confused about how RSTP is implemented. From what i understand the major difference is that STP
    used Timers for Loop prevention whereas RSTP coordinates between neighbors via messages (proposal/aggreement) to turn on links
    more quickly after topology changes and is "timer free".
    However, I have not noticed any difference in the configuration from the legacy STP
    configurations and the RSTP configuration on cisco devices. Or are there any differences??
    I have read in documentation that RSTP natively includes features like UplinkFast, BackboneFast and PortFast. So are these features now obsolete
    and not needed to be configured if you are running RSTP. (Although i have seen Portfast still configured along with RSTP on many switches)
    Also can someone explain the below Points from Cisco Documentation
    1) should STP be disabled on edge ports all together as suggested below?
    "STP edge ports are bridge ports that do not need STP enabled, where loop protection is not needed out
    of that port or an STP neighbor does not exist out of that port. For RSTP, it is important to disable STP
    on edge ports, which are typically front-side Ethernet ports, using the command bridge
    bridge-group-number spanning-disabled on the appropriate interface. If RSTP is not disabled on edge
    ports, convergence times will be excessive for packets traversing those ports."
    2) It seems RSTP relies on duplex setting to determine inter-switch links. What is the configuration to explicitly
    configure RSTP link types? (I couldnt find this in the documentation)
    "RSTP can only achieve rapid transition to the forwarding state on edge ports and on point-to-point links.
    The link type is automatically derived from the duplex mode of a port. A port that operates in fullduplex
    is assumed to be point-to-point, while a half-duplex port is considered as a shared port by
    default. This automatic link type setting can be overridden by explicit configuration. In switched
    networks today, most links operate in full-duplex mode and are treated as point-to-point links by RSTP.
    This makes them candidates for rapid transition to the forwarding state."
    Also i am a bit rough on my RSTP knowledge even after skimming a few Cisco documents. Can someone please explain this in simple way.
    Thanks in advance

    to configure it on a device:-
    spanning-tree mode rapid-pvst
    PortFast/UplinkFast & BackboneFast were cisco "Enhancements" to 802.1d STP. RSTP just incorperates them. If you want to configure portfast, the command is still "spanning-tree portfast"
    OK
    1) That is your choice - I have bitter experiance of users/IT admins just plugging hubs/switches in when ever they can. Also cabling the switch back to itself creating a cabled loop. So my advice to you is to leave STP enabled on all switch ports, BUT enable BPDUGuard - this is a life saver, if you have configured portfast.
    2) duplex auto! or duplex full (overiding)
    I really suggest that you read the 802.1d standard, once you understand normal spanning-tree - RSTP will come to you.
    http://www.cisco.com/en/US/tech/tk389/tk621/tsd_technology_support_protocol_home.html')">http://www.cisco.com/en/US/tech/tk389/tk621/tsd_technology_support_protocol_home.html')">http://www.cisco.com/en/US/tech/tk389/tk621/tsd_technology_support_protocol_home.html')">http://www.cisco.com/en/US/tech/tk389/tk621/tsd_technology_support_protocol_home.html
    http://en.wikipedia.org/wiki/Spanning_tree_protocol')">http://en.wikipedia.org/wiki/Spanning_tree_protocol')">http://en.wikipedia.org/wiki/Spanning_tree_protocol')">http://en.wikipedia.org/wiki/Spanning_tree_protocol
    HTH>

  • Can someone explain me this?

    Can someone explain me why LabVIEW embeds the graphic in sheet 1 if i specify location as "prueba"? The vi is for LV 5.0.1f1 and Excel 2000, it just creates a workbook, adds some data and creates a chart. I've tried to ask a NI engineer but i receive no answer.
    Thanks,
    Gorka
    Attachments:
    Untitled.llb ‏430 KB

    Hi Gorka,
    I am not sure if this helps but the help file for the add Sheets method says
    "Add Method (Sheets Collection)
    Creates a new worksheet, chart, or macro sheet.
    Syntax
    expression.Add(Before, After, Count, Type)
    expression Required. An expression that returns a Sheets object.
    Before Optional Variant. An object that specifies the sheet before which the new sheet is added.
    After Optional Variant. An object that specifies the sheet after which the new sheet is added.
    Count Optional Variant. The number of sheets to be added. The default value is one.
    Type Optional Variant. Specifies the sheet type. Can be one of the following XlSheetType constants: xlWorksheet, xlChart, xlExcel4MacroSheet, or xlExcel4IntlMacroS
    heet. The default value is xlWorksheet.
    Remarks
    If Before and After are both omitted, the new sheet is inserted before the active sheet.
    *******" (I added asterisks for emphesis).
    the help for the "location method" says,
    "Add Method (Sheets Collection)
    Creates a new worksheet, chart, or macro sheet.
    Syntax
    expression.Add(Before, After, Count, Type)
    expression Required. An expression that returns a Sheets object.
    Before Optional Variant. An object that specifies the sheet before which the new sheet is added.
    After Optional Variant. An object that specifies the sheet after which the new sheet is added.
    Count Optional Variant. The number of sheets to be added. The default value is one.
    Type Optional Variant. Specifies the sheet type. Can be one of the following XlSheetType constants: xlWorksheet, xlChart, xlExcel4MacroSheet, or xlExcel4IntlMacroSheet. The default value is xlWorksheet.
    Remarks
    If Before and After
    are both omitted, the new sheet is inserted before the active sheet.
    Just trying to help,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • CAN SOMEONE EXPLAIN ME THE DISPLAY QUALITY

    I have just purchased a new macbook pro 15" 2.4ghz. Im a designer, i havent even created my appleid, im on my sisters... i made a sacrifice to buy this $2700 laptop.
    and Im so dissapointed...
    I CANT SEE SMOOTH GRADIENTS.. all i see are ugly lines... i dont get it, for such a high class LAPTOP.
    Apple support please help me solve this. ive been reading forums about 6bit screens for this laptop.. i dont want to believe that. can someone explain? im returning this...

    I can verify that all of Apple's laptops use 18 bit (6 bits per Red, Green Blue) color, which is about 260,000 colors. The OS then using dithering to fake the missing colors. Despite what you have read, they are incapable of 24 bit 'millions of colors'.
    The problem with this argument is that, when it comes down to it, the color displays are made up of dithered red, green, and blue elements anyway. We accept that this form of display gives us "full color", so it's difficult to argue that millions of colors can't be represented using the same mechanism. It's not quite 16.7 million (more like 16.3 or something) but Apple's text has always taken care to read "millions of colors" rather than 16.7 million (which you'll still see on the specifications for the Cinema displays).
    Just for informational sakes though, these kinds of 6-bit displays don't rely on OS spatial dithering; they actually make use of their very fast switching to perform temporal dithering, switching a pixel between two shades very quickly to generate an in-between shade. That's why for most people the result is usually visually indistinguishable from true 8-bit color, and doesn't look like what you'd see with traditional dithering.
    If the OP is noticing severe banding on gradients, it's more likely to be an issue with color profiles than with the display being 6-bit.

Maybe you are looking for

  • Why use Oracle 8.1.5 for Linux?

    Dear, If it is really pain in the ass to install Oracle on Linux, why use it? I have spent more than 4 full days (more than what I excepted) to try to install Oracle on a Linux box. I guess I will go for mySQL since I can just install the RPM package

  • Question related to scan a website

    Hello, Can sm tell me which class shall i study in order to learn how to open a webpage and scan it? Thanks in advance!

  • Download link for Forms [32 Bit] Version 6.0.8.12.1

    Hi All, please give me the URL to download Forms [32 Bit] Version 6.0.8.12.1. Regards Manish

  • MegaSky580 in Media Center

    Hi I purchased a Megasky580 after seeing it reviewed on the inquirer.net.   After a few complications i finally managed getting everything working correctly in the presto PVR software that comes on the CD (on my MCE windows).   However i cannot get i

  • Removing the JButton press effect

    Hi, How can I remove the button press effect of JButton. I tried removing the borders and making the contentAreafilled property false; but nothing worked. Can anyone help me out.? I want to render this button in JTable Regards Clefies D S'ouza