Safari Spinning Out of Control - Why Doesn't This Get Better?!!

For a very extended period, Safari has been spinnin out of control memory-wise - no other OS I use does this, not does any other browser I use on OSX.  This goes on and on and on and on, with no real remidiation coming from Apple.  It is maddening and ruiining the usability of using the MAC and OSX.  It may be due to Flash, or Flash and Apple's refusal to properly work with Adobe - Flash is out there - it is on a huge number of websites and not just for entertainment - it cannot be avoided - also transactional sites such as StubHub use it.  If I have ten or fifteen web pages open, Safari, between Safari Web Content, Safari and Flash, can take three or four gigabytes or even more, and Flash is the least of them.  It does not happen with Firefox.  With Safari spinning out of control, the entire device slows down.  This has been going on for far far far too long.  It happen on my MacBook and my iMac.  When is this going to get resolved?  I am starting to despise using the Mac and OSX. 

For a very extended period, Safari has been spinnin out of control memory-wise - no other OS I use does this, not does any other browser I use on OSX.  This goes on and on and on and on, with no real remidiation coming from Apple.  It is maddening and ruiining the usability of using the MAC and OSX.  It may be due to Flash, or Flash and Apple's refusal to properly work with Adobe - Flash is out there - it is on a huge number of websites and not just for entertainment - it cannot be avoided - also transactional sites such as StubHub use it.  If I have ten or fifteen web pages open, Safari, between Safari Web Content, Safari and Flash, can take three or four gigabytes or even more, and Flash is the least of them.  It does not happen with Firefox.  With Safari spinning out of control, the entire device slows down.  This has been going on for far far far too long.  It happen on my MacBook and my iMac.  When is this going to get resolved?  I am starting to despise using the Mac and OSX. 

Similar Messages

  • G5 Hard Drive Spins out of control

    Every so often (like today) since the day I brought this G5 home, the Hard Drive starts to spin out of control (whether in use or asleep). I then have to force it down. When I re-start, it's just fine. This probably happens once every three months. I could never get an answer from Mac - any ideas why this happens?

    Have to say I have zero idea what an out of control spin would be (off the race track of course).
    But with any system or hard drive issue, how about repairing the drive directory with Disk Warrior.
    Force shutdowns generally cause directory problems. A Safe Boot helps, some. Not enough.
    I would not say it is fine, though, and Apple First Aid doesn't do enough.
    See this other thread with LOTS of good tips on troubleshooting:
    http://discussions.apple.com/thread.jspa?threadID=2661574

  • Why doesn't iOS get viruses?

    The question was posed to me by a Norton Support Agent.
    Why doesn't iOS get viruses?

    iOS is a closed system.  You can't download to it, or from it, unless it's within the tightly controlled Apple universe.
    Here is a link to a recent article which offers a more comprehensive answer:
    http://www.forbes.com/sites/timworstall/2012/06/04/apple-explains-why-ios-dont-n eed-no-steenkin-anti-virus/

  • Why doesn't this update work?

    Why doesn't this update work? Can't I sum up two select count(*) in such a subquery?
    Thanks
    update sales T
    set T.field2 = ((select count(*)
    from sales t
    where t.field1 = trunc(sysdate)) + (select count((*)
    from sales t2
    where t2.field2 is null));
    I get
    ERROR at line 4:
    ORA-00907: missing right parenthesis
    with the * under the +
    In other words I want to run
    update sales set field = ((select count(*) ..... ) + (select count(*) ..... ))
    Edited by: Mark1970 on 26-mar-2010 1.37
    Edited by: Mark1970 on 26-mar-2010 1.38

    My problem is to undestand why I got a syntax error about parenthesis.Because you cannot perform arithmatic operation with a value coming from a subquery in a SET clause of UPDATE
    SQL> update emp
      2  set sal=(select 1 from dual)+1;
    set sal=(select 1 from dual)+1
    ERROR at line 2:
    ORA-00933: SQL command not properly ended
    SQL> select sal from emp
      2  where deptno=(select 10 from dual)+10;
           SAL
           800
          2975
          3000
          1100
          3000
    SQL>  select deptno,sal from emp
      2   where deptno=(select 10 from dual)+10;
        DEPTNO        SAL
            20        800
            20       2975
            20       3000
            20       1100
            20       3000Try such few examples..
    Twinkle

  • Why doesn't this i phone (5c) give me automatic audible notice of an e mail ? audible

    Why doesn't this i phone (5c( give me automatic audible notice of an email ?

    Michele,
    Launch Settings / Notifications Center. There you can alter how the system notifies you. Then scroll down to Mail and adjust its specific notification type.
    Also make sure that the Alert sound is turned up in the Sounds portion of Settings.
    -Alan

  • Why doesn't OpenH264 get installed?

    Hi Mozilla Community,
    I recently deleted Firefox and reinstalled it for some troubleshooting, and now I am facing an issue with the Add-ons. It now says "Will be installed shortly" for about 2 days already for the add-on "OpenH264 Video Codec provided by Cisco Systems, Inc." (See screenshot). Why doesn't it get installed? And do I need this add-on or is it unnecessary anyway?
    Regards,
    Adrian

    Hello, any luck if you toggle (double-click on it) the '''media.peerconnection.video.h264''' to '''True''' in about:config ? After that exit firefox and restart it.
    thank you

  • HT201250 Is there any disadvantages to Time Machine? Why doesn't everyone get it?

    I am looking at Time Machine, and it looks great and really helpful. Are there any disadvantages? Why would anyone not get it? I am trying to figure out if I am missing something. Thank you!

    Unlike Mr. Galt, I don't use TM, preferring bootable clones made with Carbon Copy Cloner. Disadvantages?
    1. not bootable, so useless if the boot volume goes south, without reinstalling the OS and hoping that restores the boot volume. Alternatively, you can wipe the boot volume, reinstall the OS, and hope the TM backup is restorable. Contrast with booting into a clone and immediately knowing if it works. If so, then you're back in business.
    2. TM requires always having the ext HD connected and powered up. I prefer connecting ext FWHDs and updating clones on my schedule, not Apple;'s,
    3, I've never had to retrieve something I changed or deleted, so TM holds no value for me.
    To each their own. For more on TM vs clone, see http://pondini.org/TM/Clones.html
    Finally, a google search for TM vs clone gives many hits. Peruse them.

  • Time capsule hard disk spinning out of control

    My TC's hard disk out of of the blue yesterday started spinning louder than it usually does and cuasing it to emit a whirring, grinding like sound which acclerated to the point I thought the tc was either going to become airborn and/or explode or both.
    The tc was not living in unusal condions both enviroment, configuration or extreme temperature variations. It was on a seperate return portion of my desk with nothing around it to crowd or adversly affect. Configuration is ethernet to comcast smc business gateway over the wan port and a direct ethernet to thunderbolt conx to my macbook pro retina and finally a sonos bridge was connected as well.
    At the time this occured I had not been putting the tc through anything more unusal than providing DHCPservices for my local area network in my house.
    When I plug it back in its spits and tries to spin but gives up and the status light remains solid amber. it will not reset either as far as changing from solid amber to blinking to open airport utility. 
    its a first generation 500gb tc, however it is the third device genius bar has replaced since i purchased originally in Apr 2009? each time genius bar has replaced it through apple care on my mac as a peripheral device covered by applecare they have strangly had three! of the original (same 2008/9 model to replace the failed one which none to date has ever had any of the sympotons i describe here. just trouble accessing files. Now my fear is I no longer have the imac w/apple care the tc was covered by but I have a new macbook pro retina which I bought in December and is still under warranty so i wanted to try and economize and wait to by apple care later this spring.
    all my backups are on the tc 500 gigs worth plus I need the router support as i have comcast business class and they dont offer a wifi cable modem. I'm frantic that I will get nothing from apple care or genius bar but the same bland, robotic like detatchment all apple employees seem to be secretly instructed to treat its custromers with these days as they maddeningly tell me to buy a newer tc for $299 or $399 that i simply dont have the money to do so and dont antcipate having it at all in the next 6 months especially snce I just shelled out 2 grand in Decemeber for the new macbook pro retina. Especially saddened I coud have potentially lost all of my photos and my 60 or so gigs of itunes media purchased entirely from itunes fair and square for the  past decade to the tune of twenty thousand dollars!
    Appreciative of all your expertise,
    Desperately mistrustful of Apple in the post Steve culture
    San Francisco, Calif

    I am reading through the boards here and it sounds as though there was a small fraction of those who purchased the orignal tc in the spring of 2008 who have experinced the same issues exactly. It also sounds as though Apple ackowledged this to those who complained with a replacement of a later generation tc AND conceeded to those affected that there was indeed a design flaw. Astonishingly, Apple did not issue a press release nor a product recall!
    As I said Genius Bar here in San Francisco did replace the device three times but with the exact same model. The most recent swap was in Jan of 2012.
    I am sick to death of being disregarded and abused by Apple everytime I experience a valid hardware issue or reuire tech support period. Since 2004 I have faithfully purchased Apple Care agreements with nearly every device I've purchased and this one time when I try to save a little money by waiting untill the 90 day warranty on my macbook pro I purchased in Dec 2012 is close to expiring AS advised "off the record" by more than one Apple Care advisor.
    An abbriviated list of the hardware I have purchaded directly from Apple retail and online:
    2 ipod classics 2004
    3 ipod nanos 2006, 2007, 2009
    macbook white unibody 2007
    macbook black special edition 2008
    macbook aluminum 2009
    imac 20" 2008
    imac 24" 2009
    imac 27" 2010
    time capsule 2008
    airport expresss 4 purchased between 2008-2012
    the last airport express I bought less than one week before the new model hit the shelves but do you think Apple felt compelled to tell me or even let me trade up?
    iphone frst gen 2007
    iphone 3g 2008
    iphone 3gs (4 devices of this model purchased between 2008-2010
    iphone 4 (2 devices)
    iphone 4s "
    iphone 5 purchased in oct 2012
    Macbook pro retina purchased Dec 2012
    Do you think maybe I've just been a little too loyal? Or am I just stupid???

  • Fan problem...spinning out of control!

    Okay first off I love my new Macbook but it isnt perfect. The powerbox hisses and the fan moos a bit but last night something crazy happened! I was browsing on youtube and then hit the back button and the mac froze up and that little multicolored circle just kept spinning and nothing happened. Then the fan started to speed up faster and faster till it was going an insane speed full blast and I had to shut it off by using the power button which didnt go well either it sounded like the thing was going to take off for liftoff the fan was overspinning so fast. I was low on batteries and not plugged in so I dunno what would have caused this. Man I really don't wanna have to ship it back specially after my XBOX 360 just died too and I had to send that back. They really don't make stuff like they used to

    Just called applesupport and he basically said don't worry about it and if it happens a few times then there may be a problem. Most likely since the PC froze and the fan is run by the OS it was just running faster to protect the PC at least thats what he said.

  • Question about MyVegas games continually spinning out of control

    Windows 7
    flashplayer version 16,0,0,235
    Google Chrome
    MyVegas games will not stop spinning most of the time. Checked updates etc. all else works fine. Anyone else having same problem? All posts greatly appreciated.

    Please ask your question on a forum for the Flash Player

  • G5 HD spinning out of control, resulting in frozen system. Help!

    I have an Apple Power Macintosh G5 2.0 DP (PCI-X 2) running OS 10.5. Well-maintained and in excellent condition, it performed flawlessly for years. Recently, however, the internal 1 TB drive began spinning at a very high rate of speed, resulting in a frozen system. Booting from the second internal drive resulted in the same problem, as did booting from an external drive. Disk Utility and Tech Tool Pro could not discover any hardware problems. Could the problem be related to a faulty HD controller and, if so, what are my repair options? Any help would be welcome. Thanks.

    Get Temperature Monitor to see if it's heat related...
    http://www.macupdate.com/info.php/id/12381/temperature-monitor
    And/or iStat Pro...
    http://www.islayer.com/apps/istatpro/
    If you have any temps in the 70°C/160°F range, that's likely it.

  • Spinning out of control

    Hi,
    The JSpinner keeps firing if one of the buttons is pushed down and held down. Is there a way to just receive a single event. So that the mouse button needs to be released and pushed again before the next event is generated?
    Rene'

    Safe Mode should not prevent your Mac from connecting to the Internet. It will be generally a pain to use and graphics will be jerky but the problems you describe should not occur.
    I'm beginning to suspect your Mac's operating system has been corrupted for reasons unknown, and the next logical action before suspecting a hardware problem would be to reinstall OS X from its original installation discs.
    Before you do that please perform an SMC reset according to the following. It is justified for certain performance problems that can't be explained any other way, and is completely harmless to your Mac.
    Read and follow all the steps. After that, restart your Mac normally. If it still misbehaves, locate the original, grey System Install DVD that came with your iMac because you will need it to reinstall Snow Leopard. That will not erase your data.
    Before Resetting the SMC
    Try each of the following steps in this order before you reset the SMC. Test the issue after completing each troubleshooting step to determine if the issue still occurs.
    Press Command + Option + Escape to force quit any application that is not responding.
    Put your Mac to sleep by choosing the Apple () menu from the upper-left menu bar and then choosing Sleep. Wake the computer after it has gone to sleep.
    Restart your Mac by choosing the Apple () menu from the upper-left menu bar and then choosing Restart.
    Shut down your Mac by choosing the Apple () menu from the upper-left menu bar and then choosing Shut Down.
    Resetting the System Management Controller (SMC)
    Resetting the SMC for Mac Pro, Intel-based iMac, Intel-based Mac mini, or Intel-based Xserve
    Shut down the computer.
    Unplug the computer's power cord.
    Wait fifteen seconds.
    Attach the computer's power cord.
    Wait five seconds, then press the power button to turn on the computer.
    Test: Streaming... streaming. "Streaming". Hmmm...

  • Why doesn't this insert into XMLTYPE work?

    Hi again. Hopefully I'll be answering questions soon, but meanwhile I've got another one.
    I'm working in this environment...
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    The encoding for the database is WE8ISO8859P1.
    in SQL Plus. I created a table with an XMLTYPE column stored as binary. Here's the desc...
    PS: BWDSTG> desc bwddoc;
    Name Null? Type
    SUNAME VARCHAR2(100)
    SOURCE_DOC_TEXT CLOB
    DOC_TEXT SYS.XMLTYPE STORAGE BINARY
    LAST_UPDATE_DATE DATE
    PS: BWDSTG>
    The following error also occurred when I created the same table with a storage type of CLOB for DOC_TEXT. Here's the error I can't figure out...
    PS: BWDSTG> insert into bwddoc (doc_text) values ('<?xml version="1.0" encoding="UTF-8"?>
    2 <a>&#8211;</a>
    3 ');
    insert into bwddoc (doc_text) values ('<?xml version="1.0" encoding="UTF-8"?>
    ERROR at line 1:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00217: invalid character 8211 (U+2013)
    Error at line 2
    It accepts the command if I replace the &#8211; with plain text. Why does it care what the character entity reference is? It's changing the encoding pseudoattribute in the xml declaration to US-ASCII anyway, and this character entity should be perfectly acceptable. I'd appreciate it if anyone knows the reason for this (or what I'm not understanding, which as always is a distinct possibility).

    Sorry, let me try again. SQLPlus doesn't have a problem with the multiple lines, so I'm just trying to insert the XML.
    PS: BWDSTG> insert into bwddoc (doc_text) values (xmltype('<?xml version="1.0" encoding="US-ASCII"?>
    2 <a>&#8212;</a>
    3 '));
    insert into bwddoc (doc_text) values (xmltype('<?xml version="1.0" encoding="US-ASCII"?>
    ERROR at line 1:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00217: invalid character 8212 (U+2014)
    Error at line 2
    ORA-06512: at "SYS.XMLTYPE", line 310
    ORA-06512: at line 1
    My problem is that...
    <?xml version="1.0" encoding="US-ASCII"?>
    <a>&#8212;</a>
    should be perfectly good HTML. libxml2 and expat both have no problem parsing it. They just leave &#8212; (which is some kind of a dash) alone. But Oracle XMLType doesn't like it for some reason. I need to load a lot of data that has numeric character entities like this but I can't 'til I get this resolved.

  • Networking - Why Doesn't This Work?

    Hey all
    Just wondering if any of you have any ideas why this code isn't working properly - for the Client to connect the Server has to be restarted. Is there a solution to this problem?
    The Client Class:
    import java.awt.Container;
    import java.awt.Color;
    import java.awt.Font;
    import java.awt.FlowLayout;
    import java.awt.Dimension;
    import java.awt.GridBagLayout;
    import java.awt.GridBagConstraints;
    import java.awt.Insets;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JColorChooser;
    import javax.swing.ButtonGroup;
    import javax.swing.Box;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.BoxLayout;
    import javax.swing.JTextArea;
    import javax.swing.JTextField;
    import javax.swing.JLabel;
    import javax.swing.JComboBox;
    import javax.swing.JOptionPane;
    import javax.swing.JRadioButton;
    import java.io.*;
    import java.net.*;
    * This is the user class and holds all the details for the GUI. The gui contains listeners
    * ans it sends messages to the server and also recieves messages from the server. This class
    * works primarily with the ClienttoServer class.
    * Help was used to create this class, mainly from the Java GUI devlopment book by Varan Piroumian
    * as this hsowed the basic components needed to create a GUI and which imports were the most essential
    * in order to have an interactive interface for the chat application.
    public class Client extends JFrame implements ActionListener
         private static final long serialVersionUID = 1L;
         private JTextArea conversationDisplay;
         private JTextField createMsg, hostfield, portnumfd, usernamey;
         private JScrollPane scrolly;
         private JLabel hosty, portnum, convoLabel, msgLabel, netwrk, netwrk2, talk2urself, fonts, nickName, ustatus, econs;
         private JPanel lpanel, rpanel, lpanel1, lpanel2, lpanel3, lpanel4, lpanel5, rpanel1, rpanel2, rpanel3, rpanel4, rpanel5;
         private JButton sendMsgButton, colourButton, exitButton, connect, dropconnection;
         private JRadioButton talk2urselfOn, talk2urselfOff;
         private JComboBox fontcombiBox, statusbox, emoticons;
         private JColorChooser colourchoo;
         private Container theWholeApp;
         private String username;
         private PrintWriter writer;
         private Socket socky;
         //for the self comm button
         private boolean talktoself = true;
         //used as when a msg is sent to the server the name & msg are sent in 2 parts (\n function) i.e
         //2 different messages. So in self comm mode then the next message needs to be ignored
         private boolean ignoreyourself = false;
          * The Constructor or the class
         public Client()
              makeGUI();
              System.out.println("Loading the GUI....");
          * Creates the GUI for the user to see/use
         public void makeGUI()
              //create the whole window
              JFrame.setDefaultLookAndFeelDecorated(true);
              //set the title of the whole app
              this.setTitle("Welcome To Elliot's Chat Network...");
              //set the app window size
              this.setSize(600, 575);
              //create the outer container for the app
              theWholeApp = getContentPane();
              //make new gridbag layout
              GridBagLayout layoutgridbag = new GridBagLayout();
              //create some restraints for this...
              GridBagConstraints gbconstraints = new GridBagConstraints();
              //make the app use this gridbag layout
              theWholeApp.setLayout(layoutgridbag);
              //this is where elements are added into the application's window
              //creates and adds the convo label
              convoLabel = new JLabel("Your Conversation:");
              gbconstraints = new GridBagConstraints();
              gbconstraints.gridx = 0;
              gbconstraints.gridy = 0;
              gbconstraints.gridheight = 1;
              gbconstraints.gridwidth = 1;
              gbconstraints.weightx = 5;
              gbconstraints.weighty = 1;
              gbconstraints.anchor = GridBagConstraints.WEST;
              layoutgridbag.setConstraints(convoLabel, gbconstraints);
              theWholeApp.add(convoLabel);
              //create & add the exit button
              exitButton = new JButton("Exit");
              gbconstraints = new GridBagConstraints();
              gbconstraints.gridx = 10;
              gbconstraints.gridy = 0;
              gbconstraints.gridheight = 1;
              gbconstraints.gridwidth = 1;
              gbconstraints.weightx = 1;
              gbconstraints.weighty = 1;
              gbconstraints.anchor = GridBagConstraints.EAST;
              layoutgridbag.setConstraints(exitButton, gbconstraints);
              theWholeApp.add(exitButton);
              exitButton.addActionListener(this);
              //create & add the txt area
              conversationDisplay = new JTextArea(15,15);
              scrolly = new JScrollPane(conversationDisplay);
              gbconstraints = new GridBagConstraints();
              gbconstraints.gridx = 0;
              gbconstraints.gridy = 1;
              gbconstraints.gridheight = 4;
              gbconstraints.gridwidth = 11;
              gbconstraints.weightx = 10;
              gbconstraints.weighty = 20;
              gbconstraints.anchor = GridBagConstraints.WEST;
              gbconstraints.fill = GridBagConstraints.BOTH;
              gbconstraints.insets = new Insets(10, 10, 15, 15);
              //so the clients cant write in the display area...
              conversationDisplay.setEditable(false);
              layoutgridbag.setConstraints(scrolly, gbconstraints);
              theWholeApp.add(scrolly);
              //create & add the nick name area
              nickName = new JLabel("Your nick \nthis is required");
              gbconstraints = new GridBagConstraints();
              gbconstraints.gridx = 0;
              gbconstraints.gridy = 5;
              gbconstraints.gridheight = 1;
              gbconstraints.gridwidth = 1;
              gbconstraints.weightx = 5;
              gbconstraints.weighty = 1.5;
              gbconstraints.anchor = GridBagConstraints.WEST;
              gbconstraints.fill = GridBagConstraints.HORIZONTAL;
              gbconstraints.insets = new Insets(3, 10, 0, 0);
              layoutgridbag.setConstraints(nickName, gbconstraints);
              theWholeApp.add(nickName);
              //create & add the nick name box
              usernamey = new JTextField(10);
              gbconstraints = new GridBagConstraints();
              gbconstraints.gridx = 0;
              gbconstraints.gridy = 6;
              gbconstraints.gridheight = 1;
              gbconstraints.gridwidth = 1;
              gbconstraints.weightx = 1;
              gbconstraints.weighty = 1;
              gbconstraints.anchor = GridBagConstraints.WEST;
              gbconstraints.fill = GridBagConstraints.HORIZONTAL;
              gbconstraints.insets = new Insets(0, 10, 0, 0);
              layoutgridbag.setConstraints(usernamey, gbconstraints);
              theWholeApp.add(usernamey);
              //create & add the your message label
              msgLabel = new JLabel("Your Message:");
              gbconstraints = new GridBagConstraints();
              gbconstraints.gridx = 0;
              gbconstraints.gridy = 7;
              gbconstraints.gridheight = 1;
              gbconstraints.gridwidth = 1;
              gbconstraints.weightx = 1;
              gbconstraints.weighty = 1;
              gbconstraints.anchor = GridBagConstraints.WEST;
              gbconstraints.fill = GridBagConstraints.BOTH;
              gbconstraints.insets = new Insets(0, 10, 0, 0);
              layoutgridbag.setConstraints(msgLabel, gbconstraints);
              theWholeApp.add(msgLabel);
              //create & add the create message box
              createMsg = new JTextField(15);
              gbconstraints = new GridBagConstraints();
              gbconstraints.gridx = 0;
              gbconstraints.gridy = 8;
              gbconstraints.gridheight = 2;
              gbconstraints.gridwidth = 10;
              gbconstraints.weightx = 10;
              gbconstraints.weighty = 1;
              gbconstraints.anchor = GridBagConstraints.WEST;
              gbconstraints.fill = GridBagConstraints.HORIZONTAL;
              gbconstraints.insets = new Insets(3, 10, 0, 0);
              layoutgridbag.setConstraints(createMsg, gbconstraints);
              theWholeApp.add(createMsg);
              createMsg.addActionListener(this);
              createMsg.setActionCommand("Press Enter!");
              //create & add the send message button
              sendMsgButton = new JButton("Send Msg");
              gbconstraints = new GridBagConstraints();
              gbconstraints.gridx = 10;
              gbconstraints.gridy = 8;
              gbconstraints.gridheight = 1;
              gbconstraints.gridwidth = 1;
              gbconstraints.weightx = 1;
              gbconstraints.weighty = 1;
              gbconstraints.anchor = GridBagConstraints.EAST;
              layoutgridbag.setConstraints(sendMsgButton, gbconstraints);
              theWholeApp.add(sendMsgButton);
              sendMsgButton.addActionListener(this);
              //create & add the left panel
              lpanel = new JPanel();
              gbconstraints = new GridBagConstraints();
              gbconstraints.gridx = 0;
              gbconstraints.gridy = 10;
              gbconstraints.gridheight = 3;
              gbconstraints.gridwidth = 4;
              gbconstraints.weightx = 5;
              gbconstraints.weighty = 0;
              gbconstraints.anchor = GridBagConstraints.WEST;
              gbconstraints.insets = new Insets(0, 10, 0, 0);
              layoutgridbag.setConstraints(lpanel, gbconstraints);
              theWholeApp.add(lpanel);
              //create & add the right panel
              rpanel = new JPanel();
              gbconstraints = new GridBagConstraints();
              gbconstraints.gridx = 5;
              gbconstraints.gridy = 10;
              gbconstraints.gridheight = 3;
              gbconstraints.gridwidth = 4;
              gbconstraints.weightx = 5;
              gbconstraints.weighty = 0;
              gbconstraints.anchor = GridBagConstraints.EAST;
              layoutgridbag.setConstraints(rpanel, gbconstraints);
              theWholeApp.add(rpanel);
              //add to the left JPanel - set the layout for this
              lpanel.setLayout(new BoxLayout(lpanel, BoxLayout.Y_AXIS));
              //add panels into this left panel...
              lpanel1 = new JPanel();
              lpanel2 = new JPanel();
              lpanel3 = new JPanel();
              lpanel4 = new JPanel();
              lpanel5 = new JPanel();
              lpanel.add(lpanel1);
              lpanel.add(lpanel2);
              lpanel.add(lpanel3);
              lpanel.add(lpanel4);
              lpanel.add(lpanel5);
              //set FlowLyout for each of these panels
              lpanel1.setLayout(new FlowLayout(FlowLayout.LEFT));
              lpanel2.setLayout(new FlowLayout(FlowLayout.LEFT));
              lpanel3.setLayout(new FlowLayout(FlowLayout.LEFT));
              lpanel4.setLayout(new FlowLayout(FlowLayout.LEFT));
              lpanel5.setLayout(new FlowLayout(FlowLayout.LEFT));
              //add in the network items...
              netwrk = new JLabel("Network Details:");
              lpanel1.add(netwrk);
              //create and add instructions for this
              netwrk2 = new JLabel("Please enter the details for \nthe person you want to chat to...");
              lpanel2.add(netwrk2);
              //create/add the ip addy label
              hosty = new JLabel("Host:");
              lpanel3.add(hosty);
              lpanel3.add(Box.createRigidArea(new Dimension(5,0)));
              hostfield = new JTextField("Enter Hostname",10);
              lpanel3.add(hostfield);
              //port num next
              portnum = new JLabel("Port Number:");
              lpanel4.add(portnum);
              lpanel4.add(Box.createRigidArea(new Dimension(5, 0)));
              portnumfd = new JTextField("2250", 10);
              lpanel4.add(portnumfd);
              //create & add the connect butt
              connect = new JButton("Connect");
              lpanel5.add(connect);
              dropconnection = new JButton("Disconnect");
              lpanel5.add(dropconnection);
              connect.addActionListener(this);
              dropconnection.addActionListener(this);
              //start the creation of the right hand panel.
              rpanel.setLayout(new BoxLayout(rpanel, BoxLayout.Y_AXIS));
              //create the panels again
              rpanel1 = new JPanel();
              rpanel2 = new JPanel();
              rpanel3 = new JPanel();
              rpanel4 = new JPanel();
              rpanel5 = new JPanel();
              rpanel.add(rpanel1);
              rpanel.add(rpanel2);
              rpanel.add(rpanel3);
              rpanel.add(rpanel4);
              rpanel.add(rpanel5);
              rpanel1.setLayout(new FlowLayout(FlowLayout.LEFT));
              rpanel2.setLayout(new FlowLayout(FlowLayout.LEFT));
              rpanel3.setLayout(new FlowLayout(FlowLayout.LEFT));
              rpanel4.setLayout(new FlowLayout(FlowLayout.LEFT));
              rpanel5.setLayout(new FlowLayout(FlowLayout.LEFT));
         //now start putting things into them again
              //add in the font settings
              String[] fonty = {"Normal", "Bold", "Italic"};
              fonts = new JLabel("Set your text style:");
              fontcombiBox = new JComboBox(fonty);
              rpanel2.add(fonts);
              rpanel2.add(Box.createRigidArea(new Dimension(4,0)));
              rpanel2.add(fontcombiBox);
              //default text will be plain..
              fontcombiBox.setSelectedIndex(0);
              String[] userstatus = {"Online", "Away", "Be Right Back", "Busy", "Out To Lunch", "On The Phone"};
              ustatus = new JLabel("Select a status:");
              statusbox = new JComboBox(userstatus);
              rpanel2.add(ustatus);
              rpanel2.add(Box.createRigidArea(new Dimension(2,0)));
              rpanel2.add(statusbox);
              //add in some emotion to the conversations
              String[] emotion = {"Angry", "Happy", "Sad", "Crying", "Shocked", "Laughing", "Laughing My Ass Off!"};
              econs = new JLabel("Select an emoticon:");
              emoticons = new JComboBox(emotion);
              rpanel3.add(econs);
              rpanel3.add(Box.createRigidArea(new Dimension(3,0)));
              rpanel3.add(emoticons);
              //self comm options
              talk2urself = new JLabel("Set Self Communication Mode:");
              rpanel4.add(talk2urself);
              talk2urselfOn = new JRadioButton("On", true);
              rpanel4.add(talk2urselfOn);
              rpanel4.add(Box.createRigidArea(new Dimension(4, 0)));
              talk2urselfOff = new JRadioButton("Off", false);
              rpanel4.add(talk2urselfOff);
              //create a group that will hold both these buttons together
              ButtonGroup groupy = new ButtonGroup();
              //add them to the group
              groupy.add(talk2urselfOn);
              groupy.add(talk2urselfOff);
              //create and add the change backgrd button
              colourButton = new JButton("Alter Background");
              rpanel5.add(colourButton);
              //add in some listeners
              talk2urselfOn.addActionListener(this);
              talk2urselfOff.addActionListener(this);
              fontcombiBox.addActionListener(this);
              colourButton.addActionListener(this);
              statusbox.addActionListener(this);
              //add in the 'X' button in the top right corner of app
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              //put all elements together
              this.pack();
              //show the GUI for the user..
              this.show();
          * Creates a new client and GUI as its the main method
         public static void main(String args[])
              new Client();
          * This method listens for actions selected by the user and then performs the
          * necessary tasks in order for the correct events to take place...!
          * This method was mainly created thanks to the Developing Java GUI book which has already
          * been mentioned as it covers listeners and event handling...
         public void actionPerformed(ActionEvent event)
              //if the send button is clicked or if hard carriage return after message
              if((event.getSource() == (sendMsgButton)) || (event.getSource().equals(createMsg)))
                   //if theres no text dont send message
                   if(createMsg.getText().equals(""))
                        JOptionPane.showMessageDialog(this, "There's no text to send!");
                   else
                        String str  = createMsg.getText();
                        printMessage(str);
              //if the exit button is clicked
              if(event.getSource() == (exitButton))
                   //quit the chat app
                   JOptionPane.showMessageDialog(this, "Thanks For Using Elliot's Chat Network! \nSee You Again Soon!");
                   System.exit(0);
              //if the self comm option is turned on
              if(event.getSource() == (talk2urselfOn))
                   talktoself = true;
                   JOptionPane.showMessageDialog(this, "You have begun self communication \nmessages you send are now displayed");
              //if the self comm option is turned off
              if(event.getSource() == (talk2urselfOff))
                   talktoself = false;
                   JOptionPane.showMessageDialog(this, "You have stopped self communication \nmessages you send are no longer displayed");
              //for the normal font option
              if(fontcombiBox.getSelectedItem().equals("Plain"))
                   //makes a new font style plain...
                   conversationDisplay.setFont(new Font("simple", Font.PLAIN, 12));
                   createMsg.setFont(new Font("simple", Font.PLAIN, 12));
              //for the bold font option
              if(fontcombiBox.getSelectedItem().equals("Bold"))
                   conversationDisplay.setFont(new Font("simple", Font.BOLD, 12));
                   createMsg.setFont(new Font("simple", Font.BOLD, 12));
              //for the italic font option
              if(fontcombiBox.getSelectedItem().equals("Italic"))
                   conversationDisplay.setFont(new Font("simple", Font.ITALIC, 12));
                   createMsg.setFont(new Font("simple", Font.ITALIC, 12));
               *      //the status events if they didnt create null points...
              if(statusbox.getSelectedItem().equals("Online"))
                   String status = "<Online>";
                   printMessage(status);
              if(statusbox.getSelectedItem().equals("Away"))
                   String status = "<Away>";
                   printMessage(status);
              if(statusbox.getSelectedItem().equals("Be Right Back"))
                   String status = "<Be Right Back>";
                   printMessage(status);
              if(statusbox.getSelectedItem().equals("Busy"))
                   String status = "<Busy>";
                   printMessage(status);
              if(statusbox.getSelectedItem().equals("Out To Lunch"))
                   String status = "<Out To Lunch>";
                   printMessage(status);
              if(statusbox.getSelectedItem().equals("On The Phone"))
                   String status = "<On The Phone>";
                   printMessage(status);
              //the emoticons events...
              if(emoticons.getSelectedItem().equals("Angry"))
                   String status = "<Angry>";
                   printMessage(status);
              if(emoticons.getSelectedItem().equals("Sad"))
                   String status = "<Sad>";
                   printMessage(status);
              if(emoticons.getSelectedItem().equals("Shocked"))
                   String status = "<Shocked>";
                   printMessage(status);
              if(emoticons.getSelectedItem().equals("Happy"))
                   String status = "<Happy>";
                   printMessage(status);
              if(emoticons.getSelectedItem().equals("Crying"))
                   String status = "<Crying>";
                   printMessage(status);
              if(emoticons.getSelectedItem().equals("Laughing"))
                   String status = "<Laughing>";
                   printMessage(status);
              if(emoticons.getSelectedItem().equals("Laughing My Ass Off!"))
                   String status = "<Laughing My Ass Off!>";
                   printMessage(status);
              //if the colour button is clicked
              if(event.getSource() == colourButton)
                   //create a new colour chooser
                   colourchoo = new JColorChooser();
                   //create the dialog its shown in
                   JColorChooser.createDialog(colourButton, "Choose your background colour", true, colourchoo, this, this);
                   //now show the dialog
                   Color col = JColorChooser.showDialog(sendMsgButton, "Choose your background colour", Color.GRAY);
                   //when a colour is chosen it becomes the bg colour
                   theWholeApp.setBackground(col);
                   rpanel1.setBackground(col);
                   rpanel2.setBackground(col);
                   rpanel3.setBackground(col);
                   rpanel4.setBackground(col);
                   rpanel5.setBackground(col);
                   lpanel1.setBackground(col);
                   lpanel2.setBackground(col);
                   lpanel3.setBackground(col);
                   lpanel4.setBackground(col);
                   lpanel5.setBackground(col);
              //if the connect button is clicked
              if(event.getSource() == (connect))
                   //get the txt entered into ip addy field & port num fields with a text check...
                   if(hosty.getText().equals("") || portnumfd.getText().equals("") || nickName.getText().equals(""))
                        JOptionPane.showMessageDialog(this, "You cant connect! \nThis is because the either the \n0 - HostName\n 0 - Port Number \n0 - Your Nick \nIs Missing...");
                   else
                        //get details and connect
                        username = nickName.getText();
                        String ipay = hostfield.getText();
                        String porty = portnumfd.getText();
                        connectto(ipay,porty);
          * This method is similar to an append method in that it allows msgs recieved by the server to
          * be displayed in the conversation window. It also deals with the self comm mode as if its disabled
          * then no messages from the sender will be displayed.
         public void moveTextToConvo(String texty)
              //check
              if(ignoreyourself == true)
                   ignoreyourself = false;
              else
                   //If self comm is on the send message as normal
                   if(talktoself)
                        conversationDisplay.setText(conversationDisplay.getText() + texty);
                   else
                        //check message isnt sent by the current client - if it is ignore it!
                        if(texty.startsWith(nickName.getText()))
                             ignoreyourself = true;
                        else
                             conversationDisplay.setText(conversationDisplay.getText() + texty);
              //allows the scroll pane to move automatically with the conversation
              conversationDisplay.setCaretPosition(conversationDisplay.getText().length());
          * This method (connectto) is called if the button's clicked and also sets up a relation
          * between the client and clienttoserver class
         public void connectto(String ipa,String portNO)
              //portNO needs to be changed from string to int
              int portNum = new Integer(portNO).intValue();
              try
                   //creates a socket
                   socky = new Socket(ipa, portNum);
                   writer = new PrintWriter(socky.getOutputStream(), true);
                   ClienttoServer cts = new ClienttoServer(socky, this);
                   cts.runit();
                   //give user a prompt
                   JOptionPane.showMessageDialog(this, "You're now connected!");
              catch(UnknownHostException e)
                   System.err.println("Unknown host...");
                   //prompt the user
                   JOptionPane.showMessageDialog(this, "Failed to connect! \nPlease try again...");
              catch(IOException e)
                   System.err.println("Could Not Connect!");
                   //prompt user
                   JOptionPane.showMessageDialog(this, "Error! \nCould not connect - please try again!");
          * This method sends msgs from current client to server, sends username and then the message.
          * This is split into two different messages as the "\n" is used.
         public void printMessage(String mess)
              writer.println(usernamey.getText() + " says: \n" + mess);
              //then clear the text in the message creation area...
              createMsg.setText("");
          * Accessor method to retrieve userName
         public String getUName()
              return username;
          * Disconnect this user from the server so that they can no longer recieve/send messages
         public void dropconnection()
              try
                   //Start to close everything - informing user
                   writer.close();
                   socky.close();
                   //Give the user info on whats happening
                   JOptionPane.showMessageDialog(this, "You are now disconnected \nYou will no longer be able to \nsend and recieve messages");
                   System.out.println("A user has left the conversation...");
              catch (IOException e)
                   System.err.println("IOException " + e);
    The Server Class:
    import java.net.*;
    import java.io.*;
    * This class works in sync with the ServertoClient class in order to read
    * messages from clients and then send back out to all the active clients. Due to
    * the usage of threading multiple clients can use this server.
    * Once again some of this code is from Florians 2005 tutorial work.
    public class Server
         private ServerSocket server;
         private ServertoClient threads[];
         private static int portNo  = 2250;
         private static String Host = ""; //find method to retrieve ip
         private int maxPeeps = 20; //20 people can talk together but this can be altered
          * 1st Constructor - has no params
         public Server()
          * 2nd Constructor - allows for port number setting
         public Server(int portnumber)
              portNo = portnumber;
          * 3rd Constructor - allows for port number & max users
         public Server(int portnumber, int maxiusers)
              portNo = portnumber;
              maxPeeps = maxiusers;
          * This method is to constantly listen for possible messages from clients
         public void listener()
              //set the time out of method to just under a minute
              final int waitingTime = 500000000;
              //a boolean variable to keep it waiting
              boolean keepWait = true;
              //create a threads array of length maxpeeps
              threads = new ServertoClient[maxPeeps];
              //define a variable that will be used as a count of the no of threads
              int x = 0;
              try
                   //open a new socket on this port number
                   server = new ServerSocket(portNo);
              catch (IOException e)
                   System.err.println("IOException " + e);
                   return;
              //while the keepWait is true and the no. of threads is less than the max...
              while(keepWait && x < maxPeeps)
                   try
                        //set the timeout, this is the waitingTime (50 secs)
                        server.setSoTimeout(waitingTime);
                        //listen for connection to accept
                        Socket socky = server.accept();
                        System.out.println("A New User Has Connected");
                        //creates a new thread and adds it to array
                        threads[x] = new ServertoClient(this, socky);
                        //the thread begins
                        threads[x].start();
                   catch (InterruptedIOException e)
                        System.err.println("The Connection Timed Out...");
                        keepWait = false;
                   catch (IOException e)
                        System.err.println("IOException " + e);
                   x++; //increment no. of threads
              //if waitingTime is reached or there are too many threads then server closes
              try
                   server.close();
              catch(IOException e)
                   System.err.println("IOException " + e);
                   return;
          * This prints the string to all active threads
         public void printAll(String printy)
              for(int x = 0; x < threads.length; x++)
                   if(threads[x] !=null && threads[x].isAlive())
                        threads[x].sendMsg(printy);
          * Main method for the server, creates a new server and then continues to listen
          * for messages from different users
         public static void main(String[] args)
              Server chatsession = new Server();
              System.out.println("The Server Is Now Running on port NO: " + portNo);
              System.out.println("And IP Address: " + Host);
              chatsession.listener();
    [/code
    The ServertoClient Classimport java.lang.Thread;
    import java.net.*;
    import java.io.*;
    * This is the ClienttoServer class that acts as an intermediary between the server
    public class ClienttoServer extends Thread
         private Socket socky;
         private BufferedReader bready;
         private boolean active;
         private Client client;
         * This is the constructor to create a new client service
         public ClienttoServer(Socket socket, Client cli)
              socky = socket;
              active = false;
              client = cli;
              //try to read from the client
              try
                   bready = new BufferedReader(new InputStreamReader(socky.getInputStream()));
              catch (IOException e)
                   System.err.println("IOException " + e);
         * This method reads in from the client
         public void runit()
              active = true;
              while(active == true)
              {//continue to read in and then change the text in the conversation window
                   try
                        String message = bready.readLine();
                        client.moveTextToConvo(message + "\n");
                   catch (IOException e)
                        System.err.println("IOException " + e);
                        active = false;
    And finaly the servertoclient class
    import java.net.*;
    import java.io.*;
    import java.lang.Thread;
    * This clas provides the services that the server uses
    public class ServertoClient extends Thread
         private Socket socky;
         private Server server;
         private BufferedReader bready;
         private PrintWriter writer;
          * This constructor sets up the socket
         public ServertoClient(Server theServer, Socket theSocket)throws IOException
              socky = theSocket;
              server = theServer;
              //sets up the i/o streams
              writer = new PrintWriter(socky.getOutputStream(), true);
              bready = new BufferedReader(new InputStreamReader(socky.getInputStream()));
          * This method keeps listening until user disconnects
         public void run()
              boolean keepRunning = true;
              try
                   //keep listening 'til user disconnects
                   while(keepRunning = true)
                        final String tempmsg = bready.readLine();
                        //is there a message (if yes then print it!)
                        if(tempmsg == null)
                        else
                             server.printAll(tempmsg);
                   dropconnection();
              catch (IOException e)
                   System.err.println("IOException in thread " + Thread.currentThread() + ": " + e);
          * This method is for when a user disconnects from the server...
         public void dropconnection()
              try
                   bready.close();
                   writer.close();
                   socky.close();
              catch (IOException e)
                   System.err.println("IOException in thread " + Thread.currentThread() + ": " + e);
              System.out.println("A User Has Disconnected...");
          * This method prints the message
         public void sendMsg(String msg)
              writer.println(msg);
    }Thats it any help would be much appreciated
    Cheers.

    Like the previous poster indicated: try to find a minimal example that shows the error your experiencing.
    One thing that seems bogus is the Server.listener() method. For one thing, it can increment x even if no new connection has been established (e.g., x will be incremented if an exception is caught).

  • Why doesn't this simple script script work

    I'm pretty new to actionscript, I learned it from books, actually I still am.
    The script I'll try to work out for my site, worked fine in the lessons of the books.
    I don't think my buttons are any different, but why don't they work then.
    Can anybody figure this out.
    my script :
    stop();
    whoweare.addEventListener(MouseEvent.MOUSE_UP, onNavigate);
    function onNavigate (evt:MouseEvent):Void {
        gotoAndPlay("contact");
    whatwedo.addEventListener(MouseEvent.MOUSE_UP, onNavigate);
    function onNavigate (evt:MouseEvent):Void {
        gotoAndPlay("slideshow");
    The error : The class or interface 'MouseEvent' could not be loaded.
    Help?
    Dirkhou,

    right answer, but it was already fixed,
    It seems the problem can hide anywhere, even in the little things.
    anyway.
    Thank you for the help.

Maybe you are looking for

  • BI - SD Best Practice

    Hello all, Does anyone know where find doc's or material which explains about  Business scenarios in SD or best practice? i found this link in other thread but doesn't work  http://help.sap.com/bp_biv335/BI_EN/html/BW/SalesAnalysis.htm thanks in adva

  • I forgot my itouch 1st generation passcode and my home button is broken, is there any way to unlock it?

    I haven't used it in over 2 years and cant figure out the passcode... all it says is that i have to connect to itunes and on itunes it says i need to unlock the itouch first, please help! i use a mac btw

  • Download itunes 12.0.1 and now it wont let me sync

    Download new itunes update and now it wont let me sync. Keeps saying I need 26gb of free space which it didn't say before I downloaded the update. It doesn't make sense. It keeps saying: The iPod cannot be synced because there is not enough free spac

  • Lumia 520 Nokia Music Download Error

    Hello to all, I have lumia520, I have an existing account registered with Nokia Music I have terminated that account and created a new account, but now when I try to download song using Nokia Music I am getting an Activation Issue This Phone is alrea

  • How do I get Adobe Application Manager to start (again)?

    Hi! Adobe application Manager just told me that there were available updates for Cs5. I Pressed Update, but noticed that Photoshop and Bridge were running, so I stopped the installation to quit the programs. I stopped the installation when you're sup