Quick advice needed on Observer and Observable...

Ok at the moment i have about 10 sorting algorithms in 10 classes. They all extend another class which includes methods like print, randomise, user input etc etc which all sorting classes use. So basically my sorting classes only sort and nothing more is done in those classes.
Now what i want to do is have some statistics on a GUI. This will include copy coperations, compare operations and total operations. I will obviously need to input where these operations occur for each sorting class. I want the GUI to be updated each time an operation happens. All my sorts run in a thread, i did this so i can choose the speed of the sort with a JSlider.
My question is, will i need to be using the Observer and Observable interface? If so, can i have some advice into how i would structure this. If not, then how else can i do a statistics class. I tried a way without this approach, but it didn't seem too OO friendly. Any help is appreciated.
Thanks in advance.

I'm not a GUI guy and this is definitely not the best way to do it - but you could probably call an update method after each calculation or whatever. Make a static method that has a reference to your GUI form.
This is definitely not an elegant solution - but I think it's explicit and readable, and that can be more valuable than elegance.

Similar Messages

  • Advice needed on suitability and hardware requirements...

    Hiya folks...
    I'm after a bit of advice...regarding whether or not Aperture will be suitable for me, considering my current Apple hardware and my current "workflow".
    I'm fairly new to digital SLR photography (hobbyist only)...but have had a variety of non-SLR digital cameras over the years.
    I shoot in raw and jpeg, maybe about 100 shots when I go out (landscape and general outdoor shots mainly, some wildlife). After I have deleted the stinkers, I'm usually left with 30-50 decent shots that I keep...my iPhoto library has about 1000 images that I like, and I'm assuming that Aperture wouldn't have performance issues with a library of that size, on my hardware.
    From the library, I create web galleries, print out to A3 (max...usually 8"x6", some A4) and create photo slideshows on DVD/CD media.
    I've been using a mixture of iPhoto, Photoshop Elements 3, and Photoshop CS.
    iPhoto for photo import and organisation ; Photoshop Elements 3 for raw image manipulation, and minor tweaks ; Photoshop CS for the bulk of image processing. (The raw images produced by my camera, a Nikon D50, are not supported with the Camera raw plugin for Photoshop CS.)
    Having to utilise 3 separate programs does grate after a while...and ideally, I would like to use a single program.
    Aperture sounded ideal, but the £350 price is a little steep for a program that I may end up using as "iPhoto-on-steroids".
    An alternative would be to upgrade to Adobe Photoshop CS2...although I'm not sure whether my software would meet the upgrade criteria...my copy of Photoshop CS was purchased via eBay (authentic CD, box and manuals), but the serial number, I later found out after purchase, has been distributed on P2P networks.
    The combination of Adobe Bridge, the raw manipulation and editing features would mean, similar to Aperture, potentially a single program to cover all my needs.
    So my options are...
    1.Purchase Aperture for £350, which may be unsuitable (overkill) for my use (although I'm sure that over time I would use its features more and more)
    2. Risk paying £150 for a Photoshop CS2 upgrade that may baulk at my dubious serial number for the "original" Photoshop CS.
    3. Keep with my current software workflow...but dropping Photoshop CS, as my conscience is shouting fairly loudly. I'd miss the curves feature, and be out of pocket to the tune of £125...but that's my fault for not assuming the eBay offer was too good to be true...
    4. Any other alternatives...?
    So...knowing my "workflow", usage and requirements...can anyone offer any advice?
    Thanks for your time.
    iMac G5 (20" Rev B)   Mac OS X (10.4.3)   2GB RAM

    Rob, I'll take a quick shot at this for you.
    I'm fairly new to digital SLR photography (hobbyist
    only)...but have had a variety of non-SLR digital
    cameras over the years.
    First, welcome to digital SLR photography.
    I shoot in raw and jpeg, maybe about 100 shots when I
    go out (landscape and general outdoor shots mainly,
    some wildlife). After I have deleted the stinkers,
    I'm usually left with 30-50 decent shots that I
    keep...my iPhoto library has about 1000 images that I
    like, and I'm assuming that Aperture wouldn't have
    performance issues with a library of that size, on my
    hardware.
    You shouldn't have any performance problems with a library this size.
    From the library, I create web galleries, print out
    to A3 (max...usually 8"x6", some A4) and create photo
    slideshows on DVD/CD media.
    I've been using a mixture of iPhoto, Photoshop
    Elements 3, and Photoshop CS.
    Sounds pretty standard so far (except for using both Elements and CS).
    iPhoto for photo import and organisation ; Photoshop
    Elements 3 for raw image manipulation, and minor
    tweaks ; Photoshop CS for the bulk of image
    processing. (The raw images produced by my camera, a
    Nikon D50, are not supported with the Camera raw
    plugin for Photoshop CS.)
    Pretty much the same thing I have done (only I use PS CS2 for everything). One note. If you are considering Aperture, I would strongly suggest that you put some samples of your images on a flash card and take them down to somewhere that has Aperture loaded and available for evaluation. Judge for yourself how Aperture handles your images. This is what I did with my D2X images and was happy with the results.
    Having to utilise 3 separate programs does grate
    after a while...and ideally, I would like to use a
    single program.
    Keeping in mind that Aperture was never meant to be a replacement for either Elements or Photoshop. It does offer some correction capabilities, but more along the lines of Adobe Camera Raw (though not as full featured.) Also, there have been a number of posts here where people have noted that the adjustments that they are making in Aperture aren't as good as with ACR. I can't see any difference on my system using my D2X files.
    Aperture sounded ideal, but the £350 price is a
    little steep for a program that I may end up using as
    "iPhoto-on-steroids".
    Again, I HIGHLY recommend you go somewhere where Aperture is loaded and you have the chance to use it yourself to see if it is indeed "ideal", before you buy.
    An alternative would be to upgrade to Adobe Photoshop
    CS2...although I'm not sure whether my software would
    meet the upgrade criteria...my copy of Photoshop CS
    was purchased via eBay (authentic CD, box and
    manuals), but the serial number, I later found out
    after purchase, has been distributed on P2P
    networks.
    This, I can't help you with.
    The combination of Adobe Bridge, the raw manipulation
    and editing features would mean, similar to Aperture,
    potentially a single program to cover all my needs.
    As I noted, I have CS2. I still use Bridge and ACR. In fact, prior to getting Aperture, Bridge was the answer to my organizational prayers, letting me easily sort through shots from a shoot to get the few I really wanted to keep. To me, adding Bridge and upgrading ACR in CS2 was worth the upgrade cost of the program.
    So my options are...
    1.Purchase Aperture for £350, which may be unsuitable
    (overkill) for my use (although I'm sure that over
    time I would use its features more and more)
    True. But, you need to determine if it is for you now.
    2. Risk paying £150 for a Photoshop CS2 upgrade that
    may baulk at my dubious serial number for the
    "original" Photoshop CS.
    Again, I can't help you here.
    3. Keep with my current software workflow...but
    dropping Photoshop CS, as my conscience is shouting
    fairly loudly. I'd miss the curves feature, and be
    out of pocket to the tune of £125...but that's my
    fault for not assuming the eBay offer was too good to
    be true...
    Your call.
    4. Any other alternatives...?
    Maybe someone else has one to offer.
    Good luck.
    Jeff Weinberg

  • Advice Needed for Audio and MIDI Controller Software

    I am hoping someone may be able to give me advice on how I should approach my problem.
    I am currently running a live show with audio backing tracks and a small 12 par lighting system. The light system can be controlled via standard MIDI. I am using iTunes to play back sets of backing tracks, and manually controlling the lighting system using a dedicated foot controller.
    What I would like to do, is be able to use software to simultaneously play audio files and perfectly sync the lighting (fades, shots, etc. via midi) with the audio track. Ideally, I would be able to have the audio/lighting paired as discreet entities that could be grouped into sets.
    i.e.
    Audio-MIDI_1 = Audiotrack1 would always be paired with Lightcontroller_MIDI_events1
    Audio-MIDI_2 = Audiotrack2 would always be paired with Lightcontroller_MIDI_events2
    Audio-MIDI_3 = Audiotrack3 would always be paired with Lightcontroller_MIDI_events3
    I could the create a set of Audio-MIDI_x tracks which could be triggered in any order.
    I would like to have to option to be able to activate a single track, or have a complete group of tracks activated sequentially (but be able to stop the and start the group as needed - you never know what will happen in a live situation). It would be nice to have a time-line UI as well.
    Now the final requirement: it should be able to run on a PISMO PowerBook. <cringe>
    I hope I am not too confusing.
    I am thinking MainStage would not be the software for this task as Leo is not an option for the Powerbook.
    I have looked at QLab and showcontrolpro, but I don't think theses are right for me either.
    Any help or suggestions would be greatly appreciated.
    TIA

    Gary,
    With a Pismo you really are confined. I've been using some software from Alien Apparatus called Solo Performer Show Controller (www.alienapparatus.com) and it has a timeline to sequence lights where you can run 32 channels of midi or dmx lighting. The only setback is it needs at least a 1 GHZ processor. There may be a company like Sonnet that has an upgrade for your processor.
    The software is able to run backing tracks, send midi controls to effects units or other software, send hotkeys for apps, synchronize lyrics in a window or on an external monitor, controls a dmx fog machine, and also has a six button usb foot controller which can be configured for many things such as scrolling your songlist to select the next song, change volume of tracks, change a light scene, send a hotkey, trigger samples, etc. It is a bit pricey at just under 600 dollars but the foot control is durable, the company has excellent support and they listen to users to add features to the software.
    Hope this helps
    Thor

  • Advice needed on Waits and Timeouts - 8i on HPUnix

    I need some straight advice...We are running 8i on HPUnix. We have been tuning this thing for 6 weeks now and have most things under control (disk I/O, various cache hit ratios, etc.)...but...we still see a large number of waits...at least I think its a large number.
    Question 1. If the instance has been up for 72 hours and I see a count of io done waits for DBW0 of 2,966,179 with 78041 timeouts (as an example), is this a large number? Nothing I have seen in the Oracle documentation gives me a sense of scale.
    Question 2. What events do we have the ability to tune?
    Question 3. For those that we can tune...how do you tune them?
    Kurt
    813 483 2153

    I need some straight advice...We are running 8i on HPUnix. We have been tuning this thing for 6 weeks now and have most things under control (disk I/O, various cache hit ratios, etc.)...but...we still see a large number of waits...at least I think its a large number.
    Question 1. If the instance has been up for 72 hours and I see a count of io done waits for DBW0 of 2,966,179 with 78041 timeouts (as an example), is this a large number? Nothing I have seen in the Oracle documentation gives me a sense of scale.
    Question 2. What events do we have the ability to tune?
    Question 3. For those that we can tune...how do you tune them?
    Kurt
    813 483 2153

  • ADVICE NEEDED Apple TV and Airport Express vs Cable company modem

    In process of buying Apple TV and need some advice.  I have a cable moodem and am wondering if I should use that for Apple TV or should I also purchase airport express to use with Cable modem.  I currently do not have any airplay devices but might in future.  Recomendations about setup would be great.

    I suppose you could connect the Apple TV to your home network with a LAN cable...then have your PC wired to the same network...this would allow you to download movies, Netflix and YouTube from the internet to the Apple TV and also to play music from iTunes on your PC....but one of the things I really like about my new Apple TV is the interaction with iOS devices...it is great to mirror the desktop  from an iPad 2, it is great to show pictures etc. from the same iPad...I think you'd miss a lot if you didn't enable wi-fi...it seems like you could setup a wi-fi access point in your home for a very modest cost, and just connect the downlink from the wi-fi network to the hub of your cable modem...or your ISP might have an integrated wi-fi system you can purchase...when you setup wi-fi on Apple TV, you just need to know the name(SSID) of the wi-fi network and any password you might have..it works great.  The instruction book, though tiny, does a pretty good job of explaining stuff

  • (off topic) Quick advice needed RE: publishing

    (sorry for the waaayyy off-topic post, but I'm sure some of you gurus would know the answer to this. I'm sort of in 'freak-out' mode right now.)
    So my CD artwork is finalized, and slated to go to press this Friday. I just realized that, though I am registered with BMI, I put no mention of that on the disc or in the liner notes. DOH!
    Do I need to? If so, is simply putting "Copyright 2006 [band name here], BMI" sufficient? Or do I need a 'music company' name (in other words, not the band name).
    thanks for any advice !

    Songs are tracked and money is distributed by song title, writer and publisher name. Don't make it hard for people to pay you. Make sure you get your publisher info on there.

  • Quick advice needed...

    I have a collection of sorting algorithms which are all implemented. All of these classes have the method 'print' and 'randomise' (generates a random array of integers). This is obviously redundant, writing these two methods in every class. Should i make a class for these two methods and let every other class extend it. Or should i use an interface? Which then i will implement is every class. I'm not too sure, it would be great if i had some advice. Any help is appreciated.
    Thanks in advance.

    To me, it doesn't sound like the job of a sorting algorithm is to either generate random numbers or print out anything. I think you have incorrectly factored your application. The sorting algorithm should sort, period. It's up to the code that uses the sorting algorithm to provide the data - whether it's random or read from a file, etc... TThe sorting algorithm shouldn't know or care how the data was generated. And as well, once the data is sorted, the sorting algorithm shouldn't print it out: that's for the code using the sorting algorithm to handle. That code may print out the data or go on to use the data further. Again, the sorting algorithm shouldn't know or care in the least about that.

  • Expert advice needed on Remodeling and line item Dimension

    Hi All,
    Scenario:
    I have a cube 0FIAP_C03 for line Item. Now in this cube one of the dimensions u201CC036 -Document Detailsu201D is reaching the size of the Fact table. We are planning to use Re-Modelling and shift some of the characteristics like 0DOC_NUMBER - Sales Document, 0AC_DOC_NO - Accounting document number etc from this Dimension to another Dimension to reduce the size of this Dimension Table.
    I have the following Questions:
    1Will it be possible to add a new  dimension and shift some characteristics from old Dimension to this new Dimension using remodeling( we donu2019t want to delete data from the cube)
    2.what are the other feasible options to overcome the problem I have mentioned in my scenario( like Line Dimensions)
    3.In case we can make this dimension as Line Dimension what other changes need to be made.
    I am looking for a detailed explanation with all prou2019s and conu2019s, So kindly help me with your expert inputs.
    Thanks,
    Prafull.

    Hi Prafulla,
    Answers to your questions
    1Will it be possible to add a new dimension and shift some characteristics from old Dimension to this new Dimension using remodeling( we donu2019t want to delete data from the cube)
    No, remodelling wont work as per my understanding. ie You will have to delete and reload data
    However, this also depends on the data in your dimension.....................................................
    Consider the following example
    Index(Dim-id).....Sales document............Sales Item............Accounting document
    1......................1233456........................10.......................A123 .......end of record
    2......................1233456........................20.......................A123.......end of record
    3......................1233456........................30.......................A123.......end of record
    Now suppose if you had to remodel the above dimension to move sales item to other dimension, then the dimension would appear as below................................................................................................
    Index(Dim-id).....Sales document............Accounting document
    1......................1233456.......................A123.......end of record
    2......................1233456.......................A123.......end of record
    3......................1233456.......................A123.......end of record
    Now the problem is for the same combination of sales document and accounting document you should have had 1 row in the dimension, but you are having 3 rows(indexes) hence you are flouting the uniqueness for read and write operations to the dimension.. So logically this shouldnt be allowed...
    However if your data in the dimensions is such that the uniquness of each row in the dimension is not disturbed, you could use remodelling.
    You can try this in quality.
    2.what are the other feasible options to overcome the problem I have mentioned in my scenario( like Line Dimensions)
    I am not sure if I have understood your question. But I will still try to answer. If the dimension table has reached the size of the fact table then it is appropriate to consider remodelling.
    Also you should consider embedding sales document and accounting document in the same dimension. Since there would be generally only one accounting document each sales document.
    Use line item dimensioin as far as possible(restricted by number of characteristics). It reduces one step whie query since SIDs are directly present in fact table.. so you don't have to scan through dimension table.
    Also have you considered archiving old dat not reported... It will reduce your dimension as well and improve performance...
    3.In case we can make this dimension as Line Dimension what other changes need to be made.
    -No other changes.
    A safer option is to delete and reload data. Anyway remodelling also recommends a back up...
    Its better to create a copy cube and use the copy cube/original cube for reporting until the other cube is getting processed to have minimal time of unreportable data.
    Apologies .. Looks like the text in the post is loosing the format in which I typed hence the allignment is not correct..
    Hope this helps,
    Best regards,
    Sunmit.

  • Expert Advice Needed on SSO and 9iAS

    Hi All,
    At work we are thinking of using Single-Sign-On
    for authentication of all our intranet Applications.
    We have used Oracle Portal which has SSO, but we don't really need Portal.
    What I need to know is:
    Does Oracle 9iAS contain SSO?
    Do I need a Oracle Database e.g. Oracle 8 or oracle 9 to use SSO?
    Can I implement SSO using just Oracle 9iAS and use it in my Java code e.g. JSP/Beans etc..
    Thanks in advance for ANY help,
    Barry.

    Hi Barry,
    Does this help you?
    http://otn.oracle.com/ultrasearch/wwws_otn/searchotn.jsp?p_Action=Search&p_Query=single+sign+on&p_Group=4&p_Group=5&Search.x=11&Search.y=10
    Good Luck,
    Avi.

  • Some quick help needed with certificates and split brain dns.

    I run exch 2010 and have one cas server(srv03).  I have split brain dns configured and working in my system.  I got a new certificate this year because of the new regulations that won't allow .internal names in the san portion of an ssl cert.
     I have followed several tids on the internet and still when I tried to implement it today the outlook clients started getting a popup that says [the name on the certificate is invalid or does not match the name of the site]  At the top of this popup
    is srv03.abccorp.internal which is what it was before.
    The certificate is for mail.abccorp.com and also includes autodiscover.abccorp.com and srv03.abccorp.com.  
    When I run [Get-clientAccessServer | fl Name,AutoDiscoverServiceInternalUri] the name and the Url is correct and has the .com value.
    When I run the test email autoconfiguration from my Outlook icon, and look at the log, Autodiscover URL found through SCP, is correct and it says Succeeded at the end.  In the results tab however the Server, Availability Service, OOF URL are still showing
    the .internal instead of .com.  The Internal OWA, External OWA and the OAB are correctly displaying the .com.  What commands do I need to run to change these as they seem to be the problem.
    I wasted a lot of time chasing the autodiscover before I found out about this test in outlook and realized the autodiscover url was correct. :-)
    I have two days left on my old cert that has both .com and .internal SANs so I rolled that back into service so the users stop getting messages.  Any help would be appreciated.

    Hi OTS,
    You can run the following command to Change the InternalUrl attribute of the EWS:
    Set-WebServicesVirtualDirectory -Identity "CAS_Server_Name\EWS (Default Web Site)" -InternalUrl https://mail.abccorp.com/ews/exchange.asmx
    Best regards,
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Niko Cheng
    TechNet Community Support

  • Advice needed about JFrame and JDialog (moved from java programming)

    My main class in my application is a page where the user can choose to register or login. This class is a JFrame. If the user chooses to register, my register dialog is called up and the parent JFrame passed to the dialog:
    private void btnRegister_actionPerformed()
                    new Register(this);
              }Same happens for login. If the user chooses to login, my login dialog comes up and my main class JFrame is set as its parent. This is all fine because all the calling up is done in my main class, so i can just use 'this' to pass the JFrame.
    Now here is my problem. If the user successfully logs in, they should have access to control some events. Now i am not sure if it will be ok to make this new events class another JFrame, as it is practically the start of a new section in my application.
    Thats my first question. My second question is if i do make this events class a JDialog, is it bad coding not to give it a parent frame? Or would this be acceptable? My worries is passing the main class JFrame to a class which is only accessable by going through two other classes.
    Cheers for the advice

    It's Simple dude,
    Advice: Use JIternalFrame, for your purpose.
    And if u want to go with JDialog than u can do that in main method. Like when u call JDialog
    Register dialog = new Register(this);Check for login in Register class or what ever u want. Create new method like success
    private boolean isSuccess() {
    return success;
    } at Register Class. After Registeration change the variable boolean success value to true or false as per logic
    And add
    Register dialog = new Register(this);
    if(dialog.isSuccess()) {
    // Show loginDialg(this) or else
    }Regards,

  • Advice needed on timeline and knob

    hi all ,
    i modify the pointgraph example and included a knob from memefx to control the tranlation of the rectangle.
    so now i can control the animation back and fro using the knob. However, the interaction between the timeline.play() and the knob aren't sync.Below is my code for main.fx. no changes to pointgraph.fx.
    can someone advise me?
    To duplicate the problem, let the animation play and click the pause button. turn the knob forward and click the play button. you will see that the animation start off at a different time.

    var variable = bind myKnob.value;
    var myKnob = Knob {
        ui: BasicKnob {}
        min: 0, max: 530, minAngle:0, maxAngle:1440
        dialLinesLongEvery:5, dialLinesNumber:50, dialLinesWidth:1,
        translateX: 55, translateY:280
        scaleX: 0.25, scaleY: 0.25,
    // timeline for animation
    public var t = Timeline {
        repeatCount: 1
        keyFrames: [
            KeyFrame {
                time: 5s
                canSkip: true
                values: [
                    myKnob.value => 530.0 tween Interpolator.LINEAR
    /* adding everything in group to make changes easy */
    var gp = Group {
        content: [pg, pg1, pg2]
    /* stage can be written inside run() method */
    public function run(){
        t.play();
        var s = Stage {
            x: bind stageX
            y: bind stageY
            title: "24-Hour Temperatures in Major World Cities"
            width: 550
            height: 400
            style: StageStyle.DECORATED
            scene: Scene {
                fill: Color.BLACK
                content: [
                    gp,
                    /* rectangle moving and showing animation */
                    Rectangle {
                        translateX: bind myKnob.value
                        x: 10,
                        y: 10
                        width: 500,
                        height: 500
                        fill: Color.BLACK
                        opacity: 1.0
                    reloadButton, textButton, myKnob, playButton,textButton2,stopButton, textButton1,
                    // axis plotter
                    Path {
                        translateX: 50
                        translateY: 0
                        stroke: Color.WHITE
                        strokeWidth: 2
                        opacity: 0.4
                        elements: [
                            MoveTo {
                                x: 10.0,
                                y: 300.0
                            HLineTo {
                                x: 450.0
                            MoveTo {
                                x: 10.0,
                                y: 300.0
                            VLineTo {
                                y: 10.0
                    /* data on Axis */
                    Group {
                        translateX: 50
                        translateY: 0
                        content: for(num in [0..7]) {[
                                Text {
                                    fill: Color.WHITE
                                    font: Font {
                                        size: 10
                                    x: num * 60 + 5
                                    y: 320
                                    content: "{3*num}"
                                Text {
                                    fill: Color.WHITE
                                    font: Font {
                                        size: 10
                                    x: -5
                                    y: 320 - num * 50
                                    content: "{5*num}-"
                    Text {
                        fill: Color.WHITE
                        font: Font {
                            name: "Arial Bold"
                            size: 12
                        x: 500
                        y: 330
                        content: "Time"
                    Text {
                        rotate: -90
                        fill: Color.WHITE
                        font: Font {
                            name: "Arial Bold"
                            size: 12
                        x: -10,
                        y: 80
                        content: "Temperature"
    }

  • Advice needed on Apex and oracle context

    Hello,
    I'm facing the next issue:
    When I log into my Apex application I set a context site_id with a number.
    I'm wondering if it is needed to set my context on every page or is one time enough?
    At the moment it is working when I set my context one time when logging in.
    On other pages I created an item where I display my context using:
    return pck$context.f_get_site_id;
    FUNCTION f_get_site_id
    RETURN NUMBER
    IS
    BEGIN
    RETURN sys_context(c_ct_context,c_ct_site_id);
    END f_get_site_id;
    So my question is: is it needed to create a process that executes itself on every page with setting the context or is one time enough?
    Kind regards,
    Oli

    Well, for your purpose, you can make that assumption. The net result would be the same.
    In reality, though, each page view is associated with a database session from the database connection pool managed by modplsql. You have no idea which database session you are "attaching" to for a subsequent page view. Thus, you should always set this context for each page view.
    Strictly speaking, it's not a new database session. But for your purpose, you might as well operate like it is. Make sense?
    Joel

  • Help/advice needed SwinEvent thread and synchronization

    I am having a problem where my app keeps locking up. I have a swing application that receives asynchronous realtime messages from a server.
    On receiving these messages my views are required to update the components. I do this my calling a method with a synchronized block that updates the views components in a SwingUtilities.invokeLater clause.
    This seems to work fine. However, sometimes when I click a menu item/button the app locks up.
    I have put some debug in that shows me the synchronized block started but did not complete?!?!
    I think this tells me that the SwingEvent thread interrupted my external notification thread, and caused some sort of deadlock.
    If this is the case then why does my synchronized block of code not complete. I am not altogether sure what I should synchronize around.
    For example I am doing something like this>
    public void notify(Model model){
    if(model == null) return;
    synchronized(model){
    System.out.println("started");
    SwingUtilities.invokeLater(new Runnable(){
    componentA.setText(model.getName());
    System.out.println("ended");
    My output when it locks is like this
    started
    ended
    started
    ended
    started
    At this point the app is frozen.
    So I guess what I am asking is as follows>
    Is the SwingEvent thread interrupting my external notification thread?
    If so, why is the synchronized block not completing.
    What should I synchronize?
    Any help would be greatly appreciated.
    Dr Nes
    I can only assume that

    I am having a problem where my app keeps locking up. I have a swing application that receives asynchronous realtime messages from a server.
    On receiving these messages my views are required to update the components. I do this my calling a method with a synchronized block that updates the views components in a SwingUtilities.invokeLater clause.
    This seems to work fine. However, sometimes when I click a menu item/button the app locks up.
    I have put some debug in that shows me the synchronized block started but did not complete?!?!
    I think this tells me that the SwingEvent thread interrupted my external notification thread, and caused some sort of deadlock.
    If this is the case then why does my synchronized block of code not complete. I am not altogether sure what I should synchronize around.
    For example I am doing something like this>
    public void notify(Model model){
    if(model == null) return;
    synchronized(model){
    System.out.println("started");
    SwingUtilities.invokeLater(new Runnable(){
    componentA.setText(model.getName());
    System.out.println("ended");
    My output when it locks is like this
    started
    ended
    started
    ended
    started
    At this point the app is frozen.
    So I guess what I am asking is as follows>
    Is the SwingEvent thread interrupting my external notification thread?
    If so, why is the synchronized block not completing.
    What should I synchronize?
    Any help would be greatly appreciated.
    Dr Nes
    I can only assume that

  • Hi, I need help and advice. Basically me and my ex partner both had iphones and synced it with the same computer under the same ID. We split i have a new laptop and now it keeps asking for the old ID or it'll erase my apps bought on theold account.

    Hi, I need help and advice. Basically me and my ex partner both had iphones and synced it with the same computer under the same ID. We split up and now im trying to get all my apps and info onto my new laptop with a new account but it keeps asking me for the old apple ID which she is still using and she changed the password. i tried backing it up but still nohing. When i try to back up purchased items being apps etc its keeps asking for the old one. help

    See Recover your iTunes library from your iPod or iOS device. But you'll still need the password.
    Once you have the computer authorized to use the account she could change the password again to stop you buying apps on her card (assuming it's not on yours!). It would lock you out of upgrading them too but they should work unless she uses the deathorize all feature.
    It depends on how amicable the split is...
    tt2

Maybe you are looking for

  • How to handle multiple Sender List in Apex.

    Hi All, In our application we had created a Email configuration, the mail will be triggred based on selection of a particular "Group" it will redirect to specfic distribution list. Here is the Snippet code for the above one.     if   upper(:P1_ENG_GR

  • Ssrs 2008 export to excel and csv file

    In a ssrs 2008 report, the user will export data to PDF, excel, and CSV files. When the report is exported to excel or csv file, the user wants me to hide some tablixes. Thus can you show me code on how to export the reports to csv or excel file with

  • Multiple catalogues and missing images

    I have several overlapping catalogues in my elements 10. The largest is coordinated with the online backup (which is due to be terminated). It has over 400 missing images that cannot be reconnected via the online backup. Some of the wayward images ma

  • CS4 Wont install on Mac G4

    Hello, A friend of mine is allowing me to use his unused Mac G4 at his office while I get my business up and running. When I go to install the full program, it will not install Premier Pro, Soundbooth, On Location or Encore. I clicked on the arrow in

  • I loaded photos to my new iPad2 using iCloud. The photos went in all jumbled up. Now I can't delete them or delete the albums. How can I delete?

    I loaded photos to my new iPad2 using iCloud. The photos went in all jumbled up. Now I can't delete them or delete the albums. How can I delete?