Why do I need to reflesh one, to two times just to view a webpage properly?

Every time I visit a page, I have to refresh one, to two times before the page is able to be viewed properly. This happens on other computers, and other internet connections. How can I make it so the webpage is exactly as it should be the first time around? When I go to a page, I get the "basic" text version. Once I refresh, all the formatting, videos, and pictures will be up.

import java.awt.;
import javax.swing.;
import java.awt.datatransfer.*;
import java.io.FileReader;
import java.io.IOException;
import java.awt.event.MouseListener;
import java.awt.event.MouseEvent;
public class Main extends JPanel implements MouseListener {
public Main() {
super(new GridLayout(2,2));
final JTextArea jt= new JTextArea("dear test :) ",5,20);
FileReader reader = null;
System.err.println("Error closing reader");
exception.printStackTrace();
JButton bu = new JButton("copiar");
final Clipboard clipboard = getToolkit().getSystemClipboard();
//new add
add(nn);
add(tt);
bu.addMouseListener(new MouseListener() {
public void mouseEntered(MouseEvent e) {
StringSelection data = new StringSelection(jt.getText());
clipboard.setContents(data, data);
public void mouseClicked(MouseEvent e) { }
public void mousePressed(MouseEvent e) { }
public void mouseReleased(MouseEvent e) {}
public void mouseExited(MouseEvent e) { }
private static void createAndShowGUI() {
//Create and set up the window.
JFrame frame = new JFrame("TextDemo");
public static void main(String[] args) {
//Schedule a job for the event dispatch thread:
//creating and showing this application's GUI.
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
public void mouseClicked(MouseEvent e) { }
public void mousePressed(MouseEvent e) { }
public void mouseReleased(MouseEvent e) { }
public void mouseEntered(MouseEvent e) { }
public void mouseExited(MouseEvent e) { }
} the problem is this line bu.addMouseListener(new MouseListener() {
if i change this to bu.addMouseListener(this() {
it gives error saying expected ')'
and then doesn't compile.
i just don't know why , although the program runs when i declare the methods two times,
but i think it's better java code , if i learn it why is this error and correct it

Similar Messages

  • Why do we need more than one retained earnings accounts & what is the use?

    Hi FI Experts,
    Why do we need more than one retained earnings accounts, what is the precise use of two?
    I know the retained earnings account is used to carry forward the balances during the year end to the balance sheet and there by making the p&L A/cs balances as zero.
    I guess the second one is used for different valueations for example  as depreciation accounts for different valuations will have different retained earnings accounts.
    Kindly correct me if I am wrong and eloborate on the use having more than one retained earnings accounts.
    with regards
    Ramesh Y

    Hi,
    Well, separate retained earnings accounts are used for parallel financial reporting, it means when you need to report in accordance with, for example, local GAAP and IFRS or US GAAP at the same time. Several retained earnings accounts  are necessary when the company chooses account based approach for parallel reporting. (GL accounts are broken down into several groups, for example you use different accounts for IFRS valuation, for local GAAP and they are also shared accounts common for both principles.)
    m.

  • How can I prevent deleted mail from ending up in "All Mail"     and "Archives"?  To my horror, I've emptied these boxes and lost all my mail from all my boxes  (and why do I need to enter this question three times?"

    How can I prevent deleted mail from ending up in "All Mail" and "Archives"? 
    To my horror, I emptied these boxes and lost all my mail from all my boxes .
    All mail also disappeared from my iPad, I suppose because they are "synched"
    (Also, no offense, but why do I need to enter this question multiple times?)
    Thanks for any thoughts.

    I'm having a similar but slightly different problem. My company just migrated to Gmail, and it's saving mail drafts every 30 seconds into my Trash folder.
    I unchecked the "Show in IMAP" preference in the Gmail settings, but my Drafts folder completely disappeared. I went back and checked it and the folder reappeared (with my drafts still in there).
    I like the idea if starting an email on my laptop and having the option of finishing it on my iPhone or iPad, so only saving Drafts locally would not be ideal.

  • I own a Imac and a mac book. do I need to purchase one or two verions of the osx lion?

    I own an Imac and a Mac book. Do I need to purchase one of two versions of the OXS lion.

    One, you can install it on up to 5 computers under the same Apple ID. 

  • Why do they dribble updates in one at a time instead of combining them into a new soft pack.

    Every time I turn my computer off and then turn it back on there's a new update to download. Why aren't these updates combined into a single update instead of dribbling in one at a time. They appear to be older than my computer. I don't understand why these updates weren't included in the newer software or as a new soft pack.  When I upgraded to 8.1 I would've thought any security issues would've been included.
    Is there a way to get all the updates at one time rather than getting them dribbled in one at a time?

    lostinthetech wrote:
    Every time I turn my computer off and then turn it back on there's a new update to download. Why aren't these updates combined into a single update instead of dribbling in one at a time. They appear to be older than my computer. I don't understand why these updates weren't included in the newer software or as a new soft pack.  When I upgraded to 8.1 I would've thought any security issues would've been included.
    Is there a way to get all the updates at one time rather than getting them dribbled in one at a time?
    Unfortunately HP has nothing to do with this beyond their own drivers. You should contact MS customer service with your concerns.
    I am a Volunteer to help others on here-not a HP employee.
    Replies aren't online 24/7 because of Time Zone differences.
    Remember in this Day and Age of Computing the Internet is Knowledge at your fingertips if you choose understand it. -2015-

  • Why does my iphone only send one picture multiple times when i select multiple photos to send?

    why does my iphone send one picture multiple times when i select multiple photos to send (via message or email)?

    Are you sending via Camera itself?
    That is, selecting a picture, then select forward link symbol from bottom left
    then select another picture,
    Each time make sure you see the blue check mark at bottom right of each selected picture.
    The number of " # Photos Selected" should be displayed at the top.
    Then select Mail or Message and transmit.

  • SAP Script need to display main window two times on single page.

    Hello Guru's,
    So here is my requirement, we need to print check. We are using F110_PRENUM_CHCK and linked with driver prog RFFOUS_C. We have Letter size paper with three sections,
    1. Check
    2. Voucher Section (containing table of element 515, 525 and 530) 515: Heading, 525 : Regup-Belnr, Regup-XBLNR, Regud-Wrbtr.
                                                                                    530: Regup-SGTXT
    3. Voucher Section (As a receipt for bank itself) : contains same data as 2nd section.
    I tried several things reading all the previous post over here in SDN.
    1. Created Z form created two instances of main window it results just single display of table (voucher section) in section two and not in third.
    2. I also tried pasting two times same code in single main window which gives only last item line for the table.
    3. Created z driver program made changes in Write_form added control form for element 515 that does results in showing element 515 on both the location.
                CALL FUNCTION 'CONTROL_FORM'
                  EXPORTING
                    command   = 'NEW-WINDOW'
                  EXCEPTIONS
                    unopened  = 1
                    unstarted = 2
                    OTHERS    = 3.
                CALL FUNCTION 'WRITE_FORM'
                  EXPORTING
                    element = '515'
                  EXCEPTIONS
                    window  = 1
                    element = 2.
    3. For Element 525 and element 530 is not acting same. In the prog 525 = hlp_ep_element. And there are many write_form for this. I tried pasting each and every place same kind of code. It doesnt work. what it do it gives me three pages of output repeating every thing twice and weirdly.
    I am need this to be done as I already took so much time solving nothing is working.
    Please give me the exact location where to paste this code so I can have two times data of main window.
    Or is there any other way to do this....Any way will be good for me as long as it shows two times data in the form.
    The data is table.

    Hi Manju,
    I create a new window (no main) but does not run, please can you tell me what should I do to make it work.
    Best regards.
    Robert.

  • One Click - two times the same event?

    Hello guys, i have a little problem...
    When I click on my button it seems to be that the event handler method is run two times. I cant understand why - its happening at all buttons. can anyone help me?
    GUI.java
    public void actionPerformed(ActionEvent event) {
    transmit();                  // transmit the textfields
    p.translate();               // translate it to xml
    html = p.newHTML();          // translate the xml to html
    status.setText("<html>"+html);  // set the translatet html in the preview panel
    taHtml.setText(html);  // set the translatet html in the text area     
    The problem is that it appears two times in both, the area and the label.
    Here is the other code, if it helps.
    public String newHTML() {
              String tmp = xMLToHTMLParser.translate(xml);
              return tmp;
    public String translate(String delivered) {
                   xml = delivered;
                   html += "<b>";
                   try {
                   html += xml.substring(xml.indexOf("<Headline>")+10, xml.indexOf("</Headline>"));
                   catch(Exception e) {}  // When nothing is in the Headline do nothing.
    html += "</p>\n \n";
                   return html;
              }Thnak you so much for you help!
    Toby

    Ok, here is the transmit():
        /** Transmits the content of the Textfields to the Parser */
        private void transmit() {
             String Logoname = phases[phaseChoices.getSelectedIndex()];
             p.setLogoURL("http://www.destinations2discover.com/images/icons/"+Logoname);  // All icons are already saved on the Server
             p.setHeadline(tfHeadline.getText());
             // It's very tricky to get the correct dates in :)
             // First Step: transfer the correct Items, for next Step see Parser.java
             if( !tfAdditional.getText().equalsIgnoreCase("" )) {
                  try {
                       p.setDateline(tfAdditional.getText());
                  catch(Exception e) {
                  p.setDateline ("T Y P E C A S T   E R R O R   IN   D A T E L I N E   A D D I T I O N A L");
             /*else*/ if(( (!tfStartDay.getText().equalsIgnoreCase("")) &&  (!tfStartMonth.getText().equalsIgnoreCase("")) &&  (!tfStartYear.getText().equalsIgnoreCase("" )) && (!tfEndDay.getText().equalsIgnoreCase("")) &&  (!tfEndMonth.getText().equalsIgnoreCase("")) &&  (!tfEndYear.getText().equalsIgnoreCase("")) )) {
                  try {
                  p.setDateline ( Integer.parseInt(tfStartDay.getText()), Integer.parseInt(tfStartMonth.getText()), Integer.parseInt(tfStartYear.getText()), Integer.parseInt(tfEndDay.getText()), Integer.parseInt(tfEndMonth.getText()), Integer.parseInt(tfEndYear.getText()) );
              catch(Exception e) {
                   p.setDateline ("T Y P E C A S T   E R R O R   IN   D A T E L I N E   S T A R T  /  E N D");
             else if(((!tfStartDay.getText().equalsIgnoreCase("")) &&  (!tfStartMonth.getText().equalsIgnoreCase("")) &&  (!tfStartYear.getText().equalsIgnoreCase("" )) ) ){
                  try {
                       p.setDateline ( Integer.parseInt(tfStartDay.getText()), Integer.parseInt(tfStartMonth.getText()), Integer.parseInt(tfStartYear.getText()) );
              catch(Exception e) {
                   p.setDateline ("T Y P E C A S T   E R R O R   IN   D A T E L I N E   S T A R T");
    //-->FIX::  Add Annual Event Checkbox      if(!btnAnnual.getText().equalsIgnoreCase("StartDay"))
             if(!tfImageURL.getText().equalsIgnoreCase("")) {
                  p.setImageURL(tfImageURL.getText());
             if(!tfText.getText().equalsIgnoreCase("")) {
                  //p.setText(tfText.getText());
                  p.setText(taTxt.getText());
             if(!tfHyperlink.getText().equalsIgnoreCase("")) {
                  p.setHyperlinkURL(tfHyperlink.getText());
        }And here is the whole actionPerformed - just to make sure i have the listener not twice.
    public void actionPerformed(ActionEvent event) {
            if ("comboBoxChanged".equals(event.getActionCommand())) {
                //Update the icon to display the new phase.
                phaseIconLabel.setIcon(images[phaseChoices.getSelectedIndex()]);
            // Set the article ID from the radio buttons
            else if (event.getSource() == rbFOM) {
                p.setID(1);
            else if (event.getSource() == rbInsider){
                 p.setID(2);
            else if (event.getSource() == rbMustSee){
                 p.setID(3);
            else if (event.getSource() == rbMustDo){
                 p.setID(4);
            else if (event.getSource() == rbMustExperience){
                 p.setID(5);
            else if (event.getSource() == rbActivity){
                 p.setID(6);
            else if (event.getSource() == sendContent) {
                 transmit();                  // transmit the textfields
                 p.translate();               // translate it to xml
                 html = p.newHTML();          // translate the xml to html
                 status.setText("<html>"+html);  // set the translatet html in the preview panel
                 taHtml.setText(html);  // set the translatet html in the text area     
                 // write in html in line.html and xml in line.xml file
                 try  {
                 FileOutputStream fos = new FileOutputStream( "line.html" );
                fos.write( html.getBytes() );
                fos.close();
                catch ( Exception e ) { System.out.println(e); }
                xml = p.getXML();
                try  {
                 FileOutputStream fos2 = new FileOutputStream( "line.xml" );
                fos2.write( xml.getBytes() );
                fos2.close();
                catch ( Exception e ) { System.out.println(e); }
                show = true;     // workaround
            else if (event.getSource() == addContent) {
                 transmit();                  // transmit the textfields
                 p.translate();               // translate it to xml
                 html = p.newHTML();          // translate the xml to html
                 status.setText("<html>"+html);  // set the translatet html in the preview panel
                 taHtml.setText(html);  // set the translatet html in the text area     
                 // write in html in line.html and xml in line.xml file
                 try  {
                 FileOutputStream fos = new FileOutputStream( "line.html" );
                fos.write( html.getBytes() );
                fos.close();
                catch ( Exception e ) { System.out.println(e); }
                xml = p.getXML();
                try  {
                 FileOutputStream fos2 = new FileOutputStream( "line.xml" );
                fos2.write( xml.getBytes() );
                fos2.close();
                catch ( Exception e ) { System.out.println(e); }
                show = true;
            else if (event.getSource() == showInIE) {
                 if(show) {   // workaround
                 try  {
                      File fd= new File("");
                    path = fd.getAbsolutePath();
                    path = "C:\\Program Files\\Internet Explorer\\iexplore.exe "  + path +  "\\line.html";
                    System.out.println(path);  // debug
                      //     Runtime.getRuntime().exec("C:\\Program Files\\Internet Explorer\\iexplore.exe \"C:\\Dokumente und Einstellungen\\intern\\Eigene Dateien\\code kopie\\text2XML\\text2Destination\\line.html\"");
                      Runtime.getRuntime().exec(path);
                 catch ( Exception e ) { System.out.println(e); }
                 show = false;   // workaround
                 showInIE.disable();
                 else if(show = false) {  // workaround
                      show = true;   // workaround
            }This problem is not only at the Button with "sendContent" it is also with "addContent' and "showInIE".
    Thank you two.

  • Why does it need more than one click to follow a link on my friend's laptop?

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [/questions/824689]</blockquote><br>
    I sometimes uses my friend's laptop when in room.
    but when I use the laptop, I always have to click numerous times before it follows the clicked link.
    On facebook, google, yahoo.. just everything as long as it is a web page.
    But it does not happened when I use my pc in the office. so it must be the laptop..
    any setting needed? I tried to reinstall FF 3.6.15 and windows xp professional sp.2 but nothing solve the problem.
    Like following the email confirmation link from this forum as I register, I need to open and close new tab more than 7x before it says 'email confirmed'.
    Please help...

    It isn't, something has gone awry. Hold the power button for about 10 seconds to perform a forced shutdown. Then restart as normal. When you turn to the System Preferences, Users and Groups tab you will probably find that the account was deleted. But it may not be. If you chose the option to delete the user's folder, make sure that it is indeed deleted. It will probably be a good idea to start in recovery mode - restart holding the command R key - and use Disk Utility to repair the hard drive, just in case.

  • Why does it need up to one minute to load a mail for forwarding

    When I forward a mail (including attachments) it needs up to a minute to get the mail ready for typing a text.
    This happens only when I forward with attachments and it make no differnce wether it's a big or small attachment.
    It makes also no difference if I already opened and read the mail/attachment or not.
    Any ideas?
    Thanks
    Stefan

    read here
    https://discussions.apple.com/thread/4807442?tstart=0
    maybe your internet connection is too slow
    you can measure it here
    http://www.speedtest.net/

  • Why do we need to make Delta Green some times

    Hello Exoerts,
    Today a delta was running for a long time and i killed the job in source and made the delta red and repeated again,
    when discussing with some senior colleagues, they said, you should not  make delta always red. Is there any situation like
    we need to make delta green and request for another delta. I dont understand the total scenario.
    Can any one explain me.
    Full points assured **
    Thanks in advance

    If we records were showing zero, they asked me to do red and then go for  new delta again
    and more situation like, the job has not yet created in source system for some reason and the delta got failed , even in this scenario, they asked me to do Green.
    I am not sure about this..
    Just want to confrim .
    Please let me know..
    Thanks

  • I am using iTunes Match, and wish to restore from the cloud to itunes. Why do I have to select one at a time to download?

    I am using iTunes Match, and had to restore all of my music (.3000 songs). Problem is, I don't see where can restore them all at once. I can do it for all purchased items from the Cloud, but not for songs/content that I added on my own from CD's. I have had to click the cloud icon for each song....really, my hand is about to cramp. Is there a restore all function for non-purchased songs? If not, it needs to be added to the Match software.
    Thanks

    Instead of steaming you can just download directly from the cloud.  Don't you see the cloud icon with a downward arrow? You may have already downloaded then then. Turn off iTM and see if the songs are still present.

  • Why do I need to reinstall Adobe FlAsh EVERY TIME I restart my computer?

    Windows 7 64bit dell XPS 420

    A reasonable question, and one that it seems has been asked of Adobe. Check out the Adobe support forum, specifically:
    http://forums.adobe.com/message/3977219

  • Why do I need to install Office a second time?

    I have a Mac 27' and its great! I love it lol but I have a little problem. I've installed Microsoft office 365 on my computer and my brother made another account for the house to keep separate from his account. When I go to the house account I have to "re-install' Office even though i have already installed it the first time.. I'm just wondering why i have to installed it again after i have already installed it the first time.

    Ask Microsoft. Their requirement, not Apple's.
    Microsoft Support

  • Why do i need to reconfigure a network each time i boot up ? (G5, airport)

    I am using a G5 with a built in airport extreme card and a mini antenna. Each time I boot up I have to reconfigure a network. I could not locate any info from Apple regarding this problem. Any one know how to solve this problem?
    Thanks in advance.
    Richard
    G5   Mac OS X (10.4.3)  

    It sounds as if you have an ad-hoc network, that is a computer-to-computer network without a base station. A by product of ad-hoc networking is that you have to re-establish the network each time the computer that establishes the network is booted. This disadvantage is overcome by having a dedicated router in your network.

Maybe you are looking for