Very strange JTextPane behaviour

Hi everybody,
it would be great if someone could help me. The problem I'm facing is the following: I have a small dialog with three tabs. On the third tab there is a JTextPane to receive messages from my program. These messages are posted there by means of an abstract class that only has static methods, sort of a System.out.println() thing, only for my GUI. On the first tab there are some buttons. I have used these to post some messages into the JTextPane.
Now this is what happens:
If I click a button (post a message), and then switch to the third tab everything works fine. If I do the same again, it still works, e.g.:
This is text..
This is text..
This is text..
But if I first click the button a few times and THEN switch to the third tab, then I get the following result:
This is text..This is text..This is text..
This is text..This is text..
This is text..
I have no idea at all. I have looked everywhere, but I can't find anything. Please help me.
Greetings, Mitch

The StyledDocument cl*** does not support an append method, which is quite sad. Here it is ... declare it in your JTextPane subclass
public void appendDocument(String s,AttributeSet attr) {
StyledDocument d = (StyledDocument) getDocument();
try { d.insertString(d.getLength(),s,attr); }
catch (BadLocationException e) {} // will never happen
}Hope, this helps
greetings Marsian

Similar Messages

  • Very strange aMule behaviour

    Hello all,
    ever since I've upgraded my system (pacman -Su) I get very strange behaviour from aMule.
    I see nothing on all of the panels that list stuff (for example search results or even shared files) -- this is despite that aMule counts these items - it simply doesn't show them. (for example it says Shared Files(2))
    I guess something messed up with the wxWidget that does the sortable list stuff component or something?
    Rotem

    Without knowing the code, can't say for sure, but it sounds like the buffer was never cleared on your server.
    Typically, a client does not send data over the network until a buffer is full - then it sends the entire buffer. The server typically won't read (input.isReady() should return false) until it's receieve buffer is full.
    However, if you kill the server/client processes and restart them - it normally would clear out the buffers - as java does automatic GC pickup.
    Try adding a gc() to the termination of the server, and also try making the clients flush() their output streams before closing the connection.
    Let us know what happens.
    Message was edited by:
    watertownjordan

  • Very strange itunes behaviour: please help!

    OK. So I downloaded uniblue's 'speed up my PC' software which is highly unadvisable because quite apart from it having little noticeable effect, it appears to have really screwed up my itunes, albeit more in an annoying way than a disastrous way.
    On attempting to open itunes I am presented with a small box (Windows Xp SP3 by the way.) which says "Importing 'iTunes Music Library.xml'..." This takes about 3-4 minutes. Then the box changes to "Organizing Files" and appears to scan through my music very quickly - about 5-10 seconds.
    Then I get an error message reading: "The file 'iTunes Library.itl' does not appear to be a valid iTunes library file. iTunes has attempted to recover your itunes library and renamed this file to 'iTunes Library (Damaged).itl'
    So I press 'OK' (the only option) and itunes opens, and begins "creating artwork thumbnails" and "Determining gapless playback information" each of which takes aprox. 5 minutes.
    While this is going on another error message appears: "The itunes library file cannot be saved. An unknown error occurred (-1450)." Again 'OK' is the only option. This message sometimes appears multiple times.
    At this point I closed down itunes, uninstalled it, defragged my hard drive, deleted the itunes file and replaced it with a backup I keep on my external hard drive, then reinstalled it.
    Hallelujah! It worked fine again, opening without any problems, with all my playlist and playcount data safe. I thought I had solved my problem. However, after the third reboot itunes reverted to its old behaviour (starting from paragraph two) again. I have now been through this entire cycle about three times and am getting very fed up.
    If anyone could explain to me why this is happening and how to fix it - I wouldn't be able to thankyou enough.

    Praise be to Lord above! I have fixed it! And because I'm a nice guy and wouldn't want anyone else to go through the same frustration - I'm going to tell you how...
    It was a problem with the registry that was causing the issue and funny old thing - uniblue's 'Registry Booster' solved the issue. It's ironic that software from the same company was used to solve the problem I know...I had almost decided to uninstall all uniblue products, but decided to run one last scan with registry booster to see what happened....So just to sum up, this is how to solve the above issue:
    1. Re-create/rebuild your library as detailed in this article: http://support.apple.com/kb/HT1451 or replace itunes folder with backup. Delete any corrupted/damaged files.
    This alone should solve many issues but if you keep getting repeated corruption problems like I did then the problem seems to be within the REGISTRY.
    2. To solve the registry error - I ran uniblue's 'Registry Booster' programme. I have no idea how to fix the registry manually. Sorry.
    Message was edited by: andy525

  • Very Strange UDP Behaviour

    I've been experiencing some very weird behaviour regarding UDP packets. I understand the nature of the problem but I am confused as to what could be causing it. I know that there are a lot of intelligent people on this board so I'm hoping someone might have an idea.
    To start with my server receives duplicate packets A LOT. Basically my server is transmitting live voice audio but in order to penetrate picky NAT networks I have each of the clients send a UDP handshake (a single packet) to the server in order. If they don't receive an acknowledgement from the server in a certain amount of time they resend the packet. The server compares the packet with any that it had previously received and ensures that it is from a new location (that it is not a duplicate). Ok so one would think that there would be no problems right?
    Well I discovered a real oddity upon shutting down the server, closing all of the ports and closing all of the clients, then restarting it 1 hour later with only 1 client connecting. When the server is waiting for a handshake from the 1 and only client it gets an extra packet leftover from the previous session that took place over 1 hour ago. It is from a client that had been closed down and had all of its sockets closed and hadn't sent a packet to this port in over 1 hour (this much I am sure of). The server doesn't know that it is a duplicate packet because it only has listings of previously received packet addresses from the time that it has been started up, and this is a packet that had somehow been leftover from a session from over 1 hour ago. Why would a leftover UDP packet be lingering around the network and get received so long after it was sent?
    I appreciate any input you can give, even if they're just half formed thoughts. I'm really stumped on this one.

    Without knowing the code, can't say for sure, but it sounds like the buffer was never cleared on your server.
    Typically, a client does not send data over the network until a buffer is full - then it sends the entire buffer. The server typically won't read (input.isReady() should return false) until it's receieve buffer is full.
    However, if you kill the server/client processes and restart them - it normally would clear out the buffers - as java does automatic GC pickup.
    Try adding a gc() to the termination of the server, and also try making the clients flush() their output streams before closing the connection.
    Let us know what happens.
    Message was edited by:
    watertownjordan

  • Very strange cookie behaviour!

    I have the following (standard) portalserver and gateway setup:
    CLIENT -- IPLANET GW (gateway.domain.com) -- SAPPORTAL (sapportal.domain.com) / IPLANET PS (portalserver.domain.com)
    When I load the url https://gateway.domain.com/http://sapportal.domain.com:1081/scripts/wgate/webgui/! the browser displays a basic html form.
    Normal behaviour of this url - without - using the gateway is that two cookies are set:
    Name: ~session
    Domain: domain.com
    Path: /scripts/wgate/webgui16d7229a/
    Data: DEV:sapportal:0000.0186.cc6fc07f
    Name: ~http_content_charset
    Domain: sapportal.domain.com
    Path: /scripts/wgate/webgui16d7229a/
    Data: iso-8859-1
    Through the gateway, cookie behaviour varies depending on chosen settings, but any which way.... fails to submit the form successfully (I get an error returned by the sapportal stating "No session available.. etc.").
    The first cookie seems correct (exactly the same). These are my test results for the second cookie, with various settings:
    SCENARIO A
    HTTPD Proxy: OFF
    Non Portal Cookie Management: ON
    Result: When loading the form NO cookie is set from sapportal.domain.com, AFTER submit form IT DOES set a cookie, with the following data:
    Name: %2Fscripts%2Fwgate%2Fwebgui47e0467c%2Fsapportal.domain.com_~http_content_charset
    Domain: domain.com
    Path: /
    Data: iso-8859-1|sapportal.domain.com|/scripts/wgate/webgui47e0467c/|iplanet
    SCENARIO B
    HTTPD Proxy: OFF
    Non Portal Cookie Management: OFF
    Result: When loading the form IT DOES set a cookie by sapportal.domain.com, AFTER submit form NO cookie is set. When loading the form the following data is set:
    Name: ~http_content_charset
    Domain: domain.com
    Path: /scripts/wgate/webgui47e04937/
    Data: iso-8859-1
    SCENARIO C
    HTTPD Proxy: ON
    Non Portal Cookie Management: OFF
    Result: When loading the form IT DOES set a cookie by sapportal.domain.com, AFTER submit form NO cookie is set. When loading the form the following data data is set:
    Name: ~http_content_charset
    Domain: gateway.domain.com
    Path: /scripts/wgate/webgui47e04937/
    Data: iso-8859-1
    SCENARIO D
    HTTPD Proxy: ON
    Non Portal Cookie Management: ON
    Result: When loading the form NO cookie is set by sapportal.domain.com, AFTER submit form IT DOES set a cookie, with the following data:
    Name: %2Fscripts%2Fwgate%2Fwebgui47e0467c%2Fportalserver.domain.com_~http_content_charset
    Domain: domain.com
    Path: /
    Data: iso-8859-1|portalserver.domain.com|/scripts/wgate/webgui47e0467c/|iplanet
    Ok, so this is a lot of information, but please bare with me. What I noticed is this:
    1. Depending on chosesn settings, sometimes cookies are set upon loading of form (as they should be), sometimes afer submission of the form. Why??
    2. As I need to forward cookies in the chain from sapportal to client (through gateway) it's desired to turn ON non portal server cookie management. But why does this setting result in the cookie begin set AFTER submission of the form as turning the setting OFF doesn't?
    3. Turning the proxy on/off does not affect the behaviour mentioned in items 1 and 2, however: When proxy is turned OFF (scenario A), the host/domain is set correctly to sapportal.domain.com, as when the proxy is turned ON (scenario D) it states portalserver.domain.com. This is the name of my iplanet portalsever, which I got nothing to do with???? Why??
    Note. Of all scenario's the cookie that looks like he's got what it takes, is scenario A. But this cookie is set AFTER submitting the form, when the original situation (no gateway) does it upon loading of the form.... :S
    Does any of this makes sense? Am I missing something here?

    I haven't had any reply, but just to put things in a starker light:
    Where's the bug?
    ** In the javax.servlet.http.Cookie.getValue() method? or*
    ** In Firefox?*

  • Very Strange iTunes Behaviour???!!!

    Hi All
    Wonder if anyone can shed some light on this. I have been a happy itunes/ipod user for many years until this week! iTunes, all of a sudden, now only imports my cd's at about x5 instead of the usual x16, while it imports the mouse pointer moves in a jerky fashion as though all the memory is being used and it also messes with my broadband net connection rendering it useless and I have to reboot my pc to get the net to work again!
    I did a fresh install of itunes (latest version) no difference. I checked the cpu usage while the import is in progress - its about 50% used both cpu and RAM. My CD drive is set to DMA and my itunes library that I'm importing to is frequently emptied out to an external HD so the file on the internal HD is small.
    The only thing I can think of that I have done recently is set up an itunes store account, but surely that will not cause all these problems?
    Any clues would be appcreciated
    thanks
    Lee

    Is it a firmware issue then? I always find things like this puzzling as it was working well last week but this week it isn't????
    yeah, although i'm wondering a wee bit more about video drivers at the moment, based on the mouse/display behavior.
    i figure our PCs are pretty much gently altering on a daily basis ... what with security software updates, windows updates, and just general wear and tear. every now and then they slowly move past some threshhold, and the effects are reasonably dramatic, even though the change in the conditions has been slight and incremental.
    but enough philosophical musings ... let's try and get her working a bit better.
    perhaps before we go the drivers route, let's try some general maintenance and spring cleaning.
    download fresh definitions and do some vigorous virus and spyware scans.
    now do a disk cleanup, clear your temporary internet files (that's in your Internet options), and run your favorite disk checking utility. if you don't have one, try running a chkdsk:
    How to perform disk error checking in Windows XP
    now do a disk defrag and reboot.
    try doing a reimport of one of the CDs you were getting the grumpy behavior with. does it behave a bit better, or is the import still sluggish, and the mouse still a bit wonky?

  • Very strange display behaviour

    We have a Java application which is working fine in at least
    3 dozen windows machines (98/2000/XP). Today we installed it on
    a particuklar machine (W2K) and all we could see was a blank frame.
    When we dragged the frame, the components got painted. Every time
    a dialog opens, the same happens. Nothing is painted until the frame
    is dragged. There is nothing particular about the computer. It is your
    regular pentium IV running W2K.
    Anybody experienced this before??

    Hi,
    we seem to have a similar problem with repainting or refreshing a swing app. It runs fine on some machines and takes around 2 minutes(!) on other machines to refresh the main window after loading and working on some files. It doesn't matter on these machines wether you click or drag or resize the window, it just takes time to refresh. I have tried to add a bunch of invalidate() validate repaint, disabled the acceleration of the video cards, nothing... when I look at the task manager, the cpu does nothing during this 2 minutes.
    I am pulling my hair out and hope that the customer I have to see tomorrow has a 'compatible' PC. I am more than open to any suggestions...
    David

  • Strange delete behaviour

    Hi,
    I'm currently facing a very strange Oracle behaviour. First of all, here are the settings:
    * 2 CPUs @ 1,6 GHz
    * Raid-0 with 2 x 160 GB
    * 3 GB RAM
    * Windows 2000 Advanced Server
    * Oracle Standard 9.2.0.7 using standard settings for the instance
    On the machine there is only one db (containing one instance) running, nothing else (beside the OS). The instance has 1GB shared memory assigned and contains about 5 GB of data distributed in approx. 750 tables.
    I'm trying to delete all non-master data from the instance via simple "delete <table> where id in (select id from some_table)" statements in a script. This works perfectly (approx. 2-3 million deleted records per hour), processor load is about 50%, the Windows system monitor shows few hundred kilobytes of data read/written per minute.
    But this changes after maybe one hour running time. CPU load sinks to 4-5% and data transfer rate rises to approx. 2GB(!!) per minute. I tried to abort the deleting process and rebuild all indexes as well statistics of the schema affected, but without any improvements. The only thing working at the moment is commiting the transaction and shutting down/restarting the instance. Afterwards everything is working fine (without index/statistic rebuilding!), but only for the time period mentioned before.
    Does anyone know what could be the source of this behaviour? Anyone got any hints what to change for a better performance? I already thought of bulk inserting the whole schema in a cloned schema without constraints, but 700 tables contain a lot of constraints and triggers, so a consistent insert would be a pain in the tush...
    Thanks in advance!

    No, the disks are internal as is the raid controller. And strangely enough, not writing causes a high data rate, but reading! I assume that if the caches are too small the DB starts reading the indexes time and again, but 2 GB of index reading per minute??? No way, I say. Few hundred kilobytes or even a few megabytes makes sense in my opinion, but not the amount mentioned...
    Truncating the tables would be a solution, but have you already tried to empty a 750 table schema with constraints and triggers implementing data inheritance? I have, and it didn't work, afterwards data consistency was not given any more...
    I have already tried to delete the data in batches, each followed by a commit operation. But this brought the same result after a while, which was reading GBs of data per minute...

  • Populate List from Database (Very Strange Behaviour)

    Dear Fellows,
    I have developed a from which has two lists One for Major (say) and Other for Minor (say), thesr minors are based on the value of Major.
    Now I have developed this system on Windows XP Professional, Developer/2000 6i and Oracle 8i (release 8.1.7).
    Major list is populated from database and it shows all major values now using 'when_list_change' trigger the minor list is populated from the database based on the value of major list. Interestingly enough it is working fine without any problem.
    Now I have deployed the software to Windows 2000 Professional/Server (tried on both), Developer/2000 6i and Oracle 8.0.5, but strangly the lists are not working now. First list (major) is still working but the other dependent lists are not working.
    Another strange thing is that it populate the second list for one particular value (only at times).
    The logic is that I have used a program unit to which i am passing 'list element' and 'query' and call it for each list in the when-list-change trigge.
    Now its a very strange behaviour, I don't know what to do?
    Your cooperation will be highly appreciated.
    regards.

    rolrollerx wrote:
    Hi,
    I have Nokia N8 (a great phone, btw) with Symbian Anna. I wanted to download the maps. But the PC Ovi Suite is just busy forever, without downloading anything (I used Performance Monitor to find out it was doing nothing for hours).
    As I have unlimited data plan from my phone, I decided to try updating directly from the phone instead. It successfully downloaded the list of maps, but when I selected one of them
    "No Wi-Fi network available. Please configure a WiFi access point in the phone Internet destination settings."
    Why should I do that? I have a working connection on that phone (as evidenced by the successful download of the list of maps). So now, I am stuck. How can I download the maps?
    Well, the suggestion is there. Use a router.
    ‡Thank you for hitting the Blue/Green Star button‡
    N8-00 RM 596 V:111.030.0609; E71-1(05) RM 346 V: 500.21.009

  • Very strange behaviour master-detail-detail please help

    Very strange behaviour master-detail-detail please help
    Hello,
    I have a parent-child-grandchild report which show's some really strange behaviour.
    The data template has 3 queries Q1, Q2 and Q3.
    Q2 is bound to Q1 using a bind variable
    Q3 is bound to Q2 using another bind variable
    For a certain record in Q1 the output should be
    2 records in Q2
    and 1 record in Q3 for each record in Q2
    Q1 record
    Q2 record A
    Q3 record AA
    Q2 record B
    Q3 record BC
    The results conforms to the expected output.
    For another record in Q1 the output should be
    2 records in Q2
    and 2 records in Q3 for each record in Q2
    Q1 record
    Q2 record A
    Q3 record AA
    Q3 record AB
    Q2 record B
    Q3 record BC
    Q3 record BD
    In stead of the expected output, the result shows
    Q1 record
    Q2 record A
    Q3 record AA
    Q3 record AB
    Q2 record B
    Q3 record AB
    For another record in Q1 the output should be
    5 records in Q2
    and 2 records in Q3 for each record in Q2
    Q1 record
    Q2 record A
    Q3 record AA
    Q3 record AB
    Q2 record B
    Q3 record BC
    Q3 record BD
    Q2 record C
    Q3 record CE
    Q3 record CF
    Q2 record D
    Q3 record DG
    Q3 record DH
    Q2 record E
    Q3 record EI
    Q3 record EJ
    In stead of the expected output, the result shows
    Q1 record
    Q2 record A
    Q3 record AA
    Q3 record AB
    Q2 record B
    Q3 record BC
    Q3 record BD
    Q2 record C
    Q3 record CE
    Q3 record CF
    Q2 record D
    Q3 record DG
    Q3 record DH
    Q2 record E
    Q3 record DH
    So for the last record of Q2 I don't get the appropriate records from Q3 when there are multiple records to be shown, but only the last record which belongs to the previous Q2
    What is going on?
    Please help me out...
    Kind regards,
    Jan-Marcel

    Hi Tim,
    Thanks for your reply. Below you will find the datatemplate on the scott/tiger schema.
    Please help me out.
    Kind regards,
    Jan-Marcel
    <dataTemplate name="scott" description="Template scott" dataSourceRef="otcy001" version="1.1">
      <parameters>
        <parameter name="p_deptno" dataType="number"/>
      </parameters>
      <dataQuery>
        <sqlStatement name="Q1">
          <![CDATA[
            select empno            mgr_empno
                 , ename            mgr_name
                 , job              mgr_job
                 , hiredate         mgr_hiredate
                 , sal              mgr_sal
                 , comm             mgr_comm
              from emp
             where deptno = nvl(:p_deptno, deptno)
               and mgr is null
          ]]>
        </sqlStatement>
        <sqlStatement name="Q2">
          <![CDATA[
            select empno            mgr2_empno
                 , ename            mgr2_name
                 , job              mgr2_job
                 , hiredate         mgr2_hiredate
                 , sal              mgr2_sal
                 , comm             mgr2_comm
                 , mgr              mgr2_mgr
              from emp
             where mgr = :mgr_empno
          ]]>
        </sqlStatement>
        <sqlStatement name="Q3">
          <![CDATA[
            select empno            emp_no
                 , ename            emp_name
                 , job              emp_job
                 , hiredate         emp_hiredate
                 , sal              emp_sal
                 , comm             emp_comm
                 , mgr              emp_mgr
              from emp
             where mgr = :mgr2_empno
          ]]>
        </sqlStatement>
      </dataQuery>
      <dataStructure>
        <group name="G_mgr1" source="Q1">
          <element name="q1_mgr_empno"    value="mgr_empno"/>
          <element name="q1_mgr_name"     value="mgr_name"/>
          <element name="q1_mgr_job"      value="mgr_job"/>
          <element name="q1_mgr_hiredate" value="mgr_hiredate"/>
          <element name="q1_mgr_sal"      value="mgr_sal"/>
          <element name="q1_mgr_comm"     value="mgr_comm"/>
          <group name="G_mgr2" source="Q2">
            <element name="q2_mgr_empno"    value="mgr2_empno"/>
            <element name="q2_mgr_name"     value="mgr2_name"/>
            <element name="q2_mgr_job"      value="mgr2_job"/>
            <element name="q2_mgr_hiredate" value="mgr2_hiredate"/>
            <element name="q2_mgr_sal"      value="mgr2_sal"/>
            <element name="q2_mgr_comm"     value="mgr2_comm"/>
            <element name="q2_mgr2_mgr"     value="mgr2_mgr"/>
            <group name="G_emp" source="Q3">
              <element name="q3_emp_empno"    value="emp_empno"/>
              <element name="q3_emp_name"     value="emp_name"/>
              <element name="q3_emp_job"      value="emp_job"/>
              <element name="q3_emp_hiredate" value="emp_hiredate"/>
              <element name="q3_emp_sal"      value="emp_sal"/>
              <element name="q3_emp_comm"     value="emp_comm"/>
              <element name="q3_emp_mgr"      value="emp_mgr"/>
            </group>
          </group>
        </group>
      </dataStructure>
    </dataTemplate>

  • FOR i IN (statement) LOOP - very strange behaviour

    Hello, I'm experiencing very strange behaviour in my 9i Development Environment:
    If I run this select from SQL Plus a I get six month with number of days:
    select to_char(add_months(trunc(sysdate,'month'),rownum-1),'Month-YYYY') tmp_date, add_months(trunc(sysdate,'month'),rownum)-add_months(trunc(sysdate,'month'),rownum-1) colspan from dual a connect by level <=6
    But if I try to cycle through it in PL/SQL I only get the first row.
    FOR i in (
    select to_char(add_months(trunc(sysdate,'month'),rownum-1),'Month-YYYY') tmp_date, add_months(trunc(sysdate,'month'),rownum)-add_months(trunc(sysdate,'month'),rownum-1) colspan
    from dual a
    connect by level <=6 )
    loop
    -- print something out
    end loop;
    Any ideas why does this happen this way? If I use a query that does not contain CONNECT BY it works ok.

    Hi
    Just change as given below:
    FOR i in (
    select * from (select to_char(add_months(trunc(sysdate,'month'),rownum-1),'Month-YYYY') tmp_date, add_months(trunc(sysdate,'month'),rownum)-add_months(trunc(sysdate,'month'),rownum-1) colspan
    from dual a
    connect by level <=6 ))
    loop
    -- print something out
    end loop;
    Regards
    RK

  • Very strange behaviour of RGBImageFilter class

    Hi!
    I found very strange behaviour of RGBImageFilter class and problem is
    that I need to solve that problem :/ So, situation is next:
    I decided to use filtering process for collecting information about
    image. So, I extended my own class from RGBImageFilter and overwrite
    filterRGB( ... ) method ( everything is absolutely the same as in
    documentation ) and also added my own code for 'no matter what'.
    This code changes some class variable and my idea was to read those
    variables after filtering process end, but... Suddenly I realized that
    those variables, many times changed while filtering were performed
    ( I checked it ) after filtering gave the same value as in constructor!
    The only one clue and idea about what happened is that class instance
    were cloned and then executed, but thats not a functionality I was
    searching. :/ I made some example of that 'effect'.
    Image file name goes in command line.
    Please pay attention on -3 value on exit: Filtering works, count growing
    ( just uncomment setPixels() method to see it ) but, but...
    import java.awt.*;
    import java.awt.image.*;
    import javax.swing.*;
    class ToForum
         public static void main( String[] args )
              try
                   JFrame frame = new JFrame( "now i beleave in x-files!" );
                   frame.setDefaultCloseOperation( frame.DISPOSE_ON_CLOSE );
                   Toolkit kit = Toolkit.getDefaultToolkit();
                   Image origin = kit.getImage( args[0] );
                   RedBlueSwapFilter filter = new RedBlueSwapFilter();
                   Image filtered = frame.createImage( new FilteredImageSource( origin.getSource(), filter ) );
                   MediaTracker tracker = new MediaTracker( frame );
                   tracker.addImage( filtered, 1 );
                   tracker.waitForAll();
                   System.out.println( "AND WE GOT: "+filter.getCount()+" !!!" );
                   Container content = frame.getContentPane();
                   content.setLayout( new FlowLayout() );
                   JLabel label = new JLabel( new ImageIcon( filtered ) );
                   content.add( label );
                   frame.pack();
                   frame.setVisible( true );
              catch( Exception ex )
                   System.out.println( "Exception in main():\n"+ex );
    class RedBlueSwapFilter extends RGBImageFilter
         private int count=-5;
         public RedBlueSwapFilter()
              count = -3;
              canFilterIndexColorModel = true;
         // uncommenting this function will show that filterRGB method IS calling !!!
         // so, why then AFTER filtering count is still ( or again ??? ) equals to 0 ?
         public void setPixels( int x, int y, int w, int h, ColorModel model, int pixels[], int off, int scansize )
              System.out.println( "on entering in setPixels count="+count );
              super.setPixels( x, y, w, h, model, pixels, off, scansize );
              System.out.println( "on exiting from setPixels count="+count );
         public int filterRGB( int x, int y, int rgb )
              count++;
              return ( (rgb&0xff00ff00) | ((rgb&0xff0000) >> 16) | ((rgb&0xff) << 16) );
         public int getCount()
              return count;

    Cliff, Hi. I'm curious because this can't work. I have no problem synching with the exchange - as long as i accept the message that the certificate of the exchange (which is not the certificate of the exchange but the certificate of dig @reighthandsideofmailadress) is not valid (expired, wrong common name etc).

  • Very strange boot/device behaviour- please help!

    hello!
    i was quite happy with my macbook pro, when it one day did not boot anymore. i just saw the black screen and no startup sound was heard. i tried several times to restart, but no result. i gave up for some hours and when i came back it worked again.
    i thought it might have been the humidity as sunnier days came their way and my macbook worked without any problem.
    however, one month later i´m confronted again with this boot issue. so after the mbp has been turned off, i have to wait 30 minutes in order to be able to restart. if not, it gets stuck with the black screen.
    i went trough the troubleshooting tips (SMC reset, PRam reset) and even made an archive and install. unfortunately without any result.
    to make things worse my audio stopped to work also. first it did not even show up the devices -" no input/output devices found", after the archive and install the devices were found, but still no sound (except the startupsound)...
    ...i really do not have any clue what might be the problem, but as i am currently far from home and far from any apple support center, i would very much appreciate every hint or solution.
    tnx
    dawandeh
    macbook pro 2,33 GHz Mac OS X (10.4.9)

    hello again!
    it's very strange indeed. my macbook was working without any problems again for 2 days. then i was playing music on itunes when the screen went black(please restart), i could hear some scratchy noises before. again i could not restart. after 30 attempts the computer booted and everything worked except the audio, it said "no output devices found". i noticed that after some hours of rest my computer returns to full funcionality. as i said, i have no means to bring my computer to an apple store. maybe someone can give me an indication of what might be wrong. here is the panic.log:
    panic(cpu 0 caller 0x00136744): stack_alloc: kernelmemoryallocate
    Backtrace, Format - Frame : Return Address (4 potential args on stack)
    0x2cb63eb8 : 0x128d08 (0x3c9afc 0x2cb63edc 0x131de5 0x0)
    0x2cb63ef8 : 0x136744 (0x3ca48c 0x2cb63f2c 0x4000 0x7fff)
    0x2cb63f38 : 0x13b9a8 (0x491d8b0 0x1 0x4af85c 0x4b8070)
    0x2cb63f68 : 0x13b9fb (0x13d8d5 0x0 0x5e 0x2cb63f8c)
    0x2cb63f98 : 0x13d0b1 (0x13d8d5 0x0 0x5e 0x2cb63fbc)
    0x2cb63fc8 : 0x19a77c (0x0 0x0 0x19d0b5 0x491e2dc) Backtrace terminated-invalid frame pointer 0x0
    Kernel version:
    Darwin Kernel Version 8.8.2: Thu Sep 28 20:43:26 PDT 2006; root:xnu-792.14.14.obj~1/RELEASE_I386
    Model: MacBookPro2,2, BootROM MBP22.00A5.B01, 2 processors, Intel Core 2 Duo, 2.33 GHz, 2 GB
    Graphics: ATI Radeon X1600, ATY,RadeonX1600, PCIe, 256 MB
    Memory Module: BANK 0/DIMM0, 1 GB, DDR2 SDRAM, 667 MHz
    Memory Module: BANK 1/DIMM1, 1 GB, DDR2 SDRAM, 667 MHz
    AirPort: AirPort Extreme, 1.0.27p3
    Bluetooth: Version 1.7.11f14, 2 service, 0 devices, 1 incoming serial ports
    Serial ATA Device: Hitachi HTS541616J9SA00, 149.05 GB
    Parallel ATA Device: MATSHITADVD-R UJ-857D
    USB Device: Built-in iSight, Micron, Up to 480 Mb/sec, 500 mA
    USB Device: Apple Internal Keyboard / Trackpad, Apple Computer, Up to 12 Mb/sec, 500 mA
    USB Device: Bluetooth HCI, Up to 12 Mb/sec, 500 mA
    USB Device: IR Receiver, Apple Computer, Inc., Up to 12 Mb/sec, 500 mA
    tnx
    dawandeh

  • MacBook Pro - Battery behaving very strangely

    I have noticed there are already many threads on this, couldn't decide which one to post in so am starting a new one.
    I have a MBP 2.33 C2D 17" from late 2006. Last year I experienced the 'expanding battery' problem, my battery totally warped out of shape and was not working properly. After a fair bit of trouble with Apple France (who basically said, too bad, buy a new one), I eventually was able to go above their heads and get Apple to send me a free replacement. This seemed fair seeing as I had bought my MBP within the timeframe of an official battery recall published on the Apple site. The new battery worked absolutely fine, and is now still less than a year old.
    Recently though, it has started to behave very strangely. I hadn't made any connection that it could be to do with having upgraded to Snow Leopard, but in retrospect, after reading many of the threads here, it does seem likely that this is the case.. I recently did a big upgrade from Tiger to SL on this very machine, and it has been since then that I've had very erratic battery behaviour.
    My symptoms are similar to many I've read here: The remaining battery time (when not connected to AC) will jump from say 3 hours down to 15 mins very suddenly. Then sometimes it will jump back up again. Sometimes my battery health condition will say 'replace now', other times 'replace soon' or other times 'normal'. Also, sometimes the machine will just go to sleep with no warning, even when it had estimated more than an hour of battery time left.. upon reconnection to AC, suddenly it says 0%.
    I have always been careful to power cycle the battery properly, to let it run down regularly. Also since noticing this problem, the first thing I tried to do was recalibrate.. But I've tried twice now with no success. I let the machine run right down till it went to sleep, then left it on overnight, waiting for the power LED to stop flashing on the front of the machine.. But it wouldn't stop flashing even after being left off overnight. I have yet to try an SMC reset, will do that next.
    I realize my battery is not brand new, nor is my computer. However, this was a replacement battery I received less than a year ago. I'll put the battery stats below, but I'm not sure I believe them because I've been checking what is says a lot recently and sometimes it even shows a full charge capacity of a negative number! Something strange is going on here. I obviously don't expect full performance from a battery nearly a year old, but what it's doing here seems to be more than just a case of a battery getting old, especially having seen that many other users are having a similar set of symptoms after going to Snow Leopard.
    Model Information:
    Manufacturer: SMP
    Device name: ASMB014
    Pack Lot Code: 0002
    PCB Lot Code: 0000
    Firmware Version: 0110
    Hardware Revision: 0500
    Cell Revision: 0102
    Charge Information:
    Charge remaining (mAh): 2453
    Fully charged: Yes
    Charging: No
    Full charge capacity (mAh): 2453
    Health Information:
    Cycle count: 396
    Condition: Replace Now
    Battery Installed: Yes
    Amperage (mA): 0
    Voltage (mV): 12597
    Any suggestions appreciated..
    Cheers.

    I just got off a call with Apple support. The tech agreed that my symptoms were not normal, even for a battery with a cycle count over 300 like mine.. especially with the fact that the system profiler is showing bizarre info that makes no sense such as a full charge of a negative number. He said that basically the only thing I can try is to do an archive and reinstall of Snow Leopard, since it seems that the operating system is possibly corrupted. I don't think it's anything to do with the physics of the battery, it is more likely that the OS is not interacting properly with the battery, thus giving false and conflicting readings and information.. He seemed quite certain that it can't be a problem with Snow Leopard itself, seeing as all of the laptops in the Apple Support office were on SL and did not have this problem. So in his opinion, a corrupted OS was the most likely explanation. In any case, he said that batteries are only covered by a 90 day guarantee, so if it turns out that after a reinstall, my problem doesn't go away, then I'll have no choice but to buy a new battery because they won't cover it... This doesn't seem very fair to me because if it turns out that the OS has nothing to do with it, then it must be a faulty battery, because this kind of behaviour is certainly not what I'd call acceptable for a battery of less than a year old.
    Anyway, I'll perhaps try the archive and install process on the weekend and see what happens.

  • Strange POF behaviour in 3.6.1.3

    Hi All,
    We have been seeing some strange POF behaviour in 3.6.1.3 paricularly around classes with boolean fields.
    Here is my test case:
    package org.gridman.pof;
    import com.rbs.odc.dashboard.server.cluster.model.Case;
    import com.tangosol.io.pof.ConfigurablePofContext;
    import com.tangosol.io.pof.PofReader;
    import com.tangosol.io.pof.PofWriter;
    import com.tangosol.io.pof.PortableObject;
    import com.tangosol.io.pof.reflect.PofValue;
    import com.tangosol.io.pof.reflect.PofValueParser;
    import com.tangosol.io.pof.reflect.SimplePofPath;
    import com.tangosol.util.Binary;
    import com.tangosol.util.ExternalizableHelper;
    import java.io.IOException;
    public class JK implements PortableObject {
        private String stringField;
        private boolean booleanFieldOne;
        private boolean booleanFieldTwo;
        public JK() {
        public JK(boolean booleanFieldOne, boolean booleanFieldTwo, String stringField) {
            this.booleanFieldOne = booleanFieldOne;
            this.booleanFieldTwo = booleanFieldTwo;
            this.stringField = stringField;
        @Override
        public void readExternal(PofReader pofReader) throws IOException {
            stringField = pofReader.readString(0);
            booleanFieldOne = pofReader.readBoolean(1);
            booleanFieldTwo = pofReader.readBoolean(2);
        @Override
        public void writeExternal(PofWriter pofWriter) throws IOException {
            pofWriter.writeString(0, stringField);
            pofWriter.writeBoolean(1, booleanFieldOne);
            pofWriter.writeBoolean(2, booleanFieldTwo);
        public static void main(String[] args) {
            ConfigurablePofContext pofContext = new ConfigurablePofContext("jk-pof-config.xml");
            JK value = new JK(false, true, "JK");
            Binary binary = ExternalizableHelper.toBinary(value, pofContext);
            PofValue pofValue = PofValueParser.parse(binary, pofContext);
            PofValue childOne = new SimplePofPath(0).navigate(pofValue);
            PofValue childTwo = new SimplePofPath(1).navigate(pofValue);
            PofValue childThree = new SimplePofPath(2).navigate(pofValue);
            System.out.println(childOne.getValue());
            try {
                System.out.println(childTwo.getValue());
            } catch (Exception e) {
                System.out.println("Exception: " + e.getMessage());
            try {
                System.out.println(childThree.getValue());
            } catch (Exception e) {
                System.out.println("Exception: " + e.getMessage());
    }and the jk-pof-config.xml file used above...
    <pof-config>
        <user-type-list>
            <include>coherence-pof-config.xml</include>
            <user-type>
                <type-id>3001</type-id>
                <class-name>org.gridman.pof.JK</class-name>
            </user-type>
        </user-type-list>
    </pof-config>When you run the main method of the class above you would expect to get
    JK
    false
    true... but what you get is...
    JK
    null
    Exception: -34 is an invalid typeWhat is going on? The booleanFieldOne seems to have been serialized as type -34 which is PofConstants.V_BOOLEAN_TRUE which makes sense but the code to deserialize the field cannot handle type -34. The booleanFieldTwo comes back as null and is serialized as type -65 which is PofConstants.T_UNKNOWN
    Where this causes us a problem is if we do a query with a filter like this...
    new EqualsFilter(new PofExtractor(null, 1), true);...it will break whenever it tries to extract the POF value where booleanFieldOne is true.
    I know we can fix this by always specifying the type, so this will work
    new EqualsFilter(new PofExtractor(Boolean.class, 1), true);and this will work too wheras it fails without specifying the type...
    childTwo.getValue(Boolean.class);So although there are work-arounds it seems very strange.
    What is even stranger is that if you do not serialize the stringField so the readExternal and writeExtrnal methods look like this
    @Override
    public void readExternal(PofReader pofReader) throws IOException {
        //stringField = pofReader.readString(0);
        booleanFieldOne = pofReader.readBoolean(1);
        booleanFieldTwo = pofReader.readBoolean(2);
    @Override
    public void writeExternal(PofWriter pofWriter) throws IOException {
        //pofWriter.writeString(0, stringField);
        pofWriter.writeBoolean(1, booleanFieldOne);
        pofWriter.writeBoolean(2, booleanFieldTwo);
    }The you get this output...
    null
    false
    Exception: -34 is an invalid typeiNow the stringField is null (as we have not serialized it) but the booleanFieldOne is now being desrialized correctly as a boolean false. We have noticed that if you have a boolean as the first field you serialize in the writeExternal method then it is serialized as POF type -11 which is PofConstants.T_BOOLEAN and will be deserialized as the correct true or false value.
    Cheers,
    JK

    Hi René,
    Just changing the field types to Boolean like this...
    private Boolean booleanFieldOne;
    private Boolean booleanFieldTwo;made no difference. But then changing the writeExternal method to use writeObject instead of writeBoolean did fix it and the types of both fields are -11 or PofConstants.T_BOOLEAN
    @Override
    public void writeExternal(PofWriter pofWriter) throws IOException {
        pofWriter.writeString(0, stringField);
        pofWriter.writeObject(1, booleanFieldOne);
        pofWriter.writeObject(2, booleanFieldTwo);
    }So using writeObject instead of writeBoolean would be another fix, but obviously most people would pick writeBoolean to store a boolean value.
    JK

Maybe you are looking for

  • Regarding Creating Participants to a Role in one go.

    Hi, Is there any way through which multiple users can be created at the same time for a specific role in BEA Aqualogic BPM Studio/Enterprise server. If there is one, please let me know Regards, Abhishek M

  • Updating Apps in iTunes from my Phone

    The Apps on my iPhone are updated. I sync the phone with a MacBook Air. I also want to sync the phone with my iMac.  on the iMac iTunes is showing apps that are available for update and wants to re-download these.  Why can I not sync the apps from my

  • LDAP import users - restrictions reset after user logs in

    Using ice I imported my users in to a container with a password. With admin rights I checked Required a password Force periodic password changes Required password changes Limit grace logins User logs in all fields return back to unchecked. I gave NDS

  • PRS Condition - Updating Service Condition from PO/RFQ

    Deal all, I am facing a great difficulty in updating the Service Condition Record (ML35 - With Plant & Vendor) via PO. I have done the following settings but still when the PRS condition price is changed in PO or Quotation, the price in Service condi

  • Handle leaks?

    Has anyone seen handle leaks in ODP.NET? I have a multi-threaded server application that contains managed and unmanaged C++ code and uses ODP.NET. It leaks handles that seem to be thread handles created by ODP.NET. I cannot reproduce it in a simple t