My Compnents are disappearing...

Here I have the simplest applet you could ask for, which I've simpified from a much larger one to try and identify the problem. When I start the applet up, the screen is blank. When I resize it, the button appears. Why doesn't my Button appear first time round?!
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
public class MyApplet extends Applet{
Graphics g;
public void init() {
     this.setBackground(Color.white);
     this.setLayout(new GridLayout(4,14));
}//end of init
public void paint(Graphics g) {
     Button b=new Button("Here");
     add(b);
     b.setVisible(true);
}//end of paint
}//end of class
Hope you can help, thanks.

import java.awt.*;
public class MyApplet extends java.applet.Applet{
public void init() {
this.setBackground(Color.white);
this.setLayout(new GridLayout(4,14));
Button b=new Button("Here");
add(b);
}

Similar Messages

  • Images I move from one folder into another are disappearing, at first it was occurring immediately if I did not copy and paste the images. Today however I found out that images I had been using for days just up and vanished from their new location.

    Images I move from one folder into another are disappearing, at first it was occurring immediately and only if I did not copy and paste the images. Today however I found out that images I had been using for days just up and vanished from their new location. A few of these images had copies in another folder that remained and the ones I couldn't find may or may not have ever had copies. I had backed up my system with time machine recently as well, so I went into the backup to retreive the lost images. When I searched and found the backup copies I got the error "the file alias cannot be opened because the original cannot be located". The crazy thing is that the images that remained on my computer did not give me the same error and opened like they should.
    In short images that I am creating, saving, and using are disapearing so epically that even time machine versions are affected when retrieval is attempted. Any suggestions as to what I could be doing wrong without realizing it? Or perhaps other people have had similar bugs that are software related and have a solution?

    Hi Kevin,
    I understand what you tried to do but it doesn't work that way. Swapping drive names will just mess things up.
    You should be able to reconnect the files though: in the Locate Referenced Files dialog make sure you click the Show Reconnect Options button — this will give you access to all the connected drives. Locate one of the files and hit Reconnect All. Should do the trick.
    Best

  • Mac 10.5.8 is running slow and programs are disappearing

    Hi guys,
    I actually have more than one problem with my Mac:
    For one it is running slow especially when using Firefox and Office at the same time often resulting in me having to force quit the programs because they are not responding.
    Lately applications are disappearing. First Stickies which is really! bad, because, stupid as I am, I put important info on them and did not make a backup. I tried to restore them via Time Machine but find nothing under ~Library/.StickiesDatabase, ...Application Support... or ...Preferences/com.apple.Stickies.plist
    Then Preview disappeared which, luckily i could restore via Time Machine.
    And now iCal looks different in dock (the white square surrounding the actual date disappeared) so I am guessing this  soon will be gone as well.
    Another info that probably is important: my battery is swollen so generally I use the Mac without the battery
    Do you think this is a virus? Or maybe 10.5.8. is just too old a version? Do you think an upgrade to at least 10.6. would help or rather worsen things? And is it worth it to invest in an upgrade, a new battery, a complete check-up or should I just wait until the poor thing dies and get a new one (which would be really painful)?
    As you can see I am a clueless user, and I am sorry for any stupid questions in advance and thankful for any support!

    thank you for the reply. i checked the smart status which said disk is veryfied. i ran the repair anyways. this is the protoco (i dont really know what to make of it)l:
    Warning: SUID file "System/Library/Filesystems/AppleShare/afpLoad" has been modified and will not be repaired.
    Permissions differ on "private/var/log/secure.log", should be -rw------- , they are -rw-r----- .
    Permissions differ on "System/Library/CoreServices/Front Row.app/Contents/CodeResources", should be -rw-r--r-- , they are lrw-r--r-- .
    Permissions differ on "System/Library/CoreServices/Front Row.app/Contents/PlugIns/DVD.frappliance/Contents/CodeResources", should be -rw-r--r-- , they are lrw-r--r-- .
    Permissions differ on "System/Library/CoreServices/Front Row.app/Contents/PlugIns/FRSettings.frappliance/Contents/CodeResources", should be -rw-r--r-- , they are lrw-r--r-- .
    Permissions differ on "System/Library/CoreServices/Front Row.app/Contents/PlugIns/FRSources.frappliance/Contents/CodeResources", should be -rw-r--r-- , they are lrw-r--r-- .
    Permissions differ on "System/Library/CoreServices/Front Row.app/Contents/PlugIns/Movies.frappliance/Contents/CodeResources", should be -rw-r--r-- , they are lrw-r--r-- .
    Permissions differ on "System/Library/CoreServices/Front Row.app/Contents/PlugIns/Music.frappliance/Contents/CodeResources", should be -rw-r--r-- , they are lrw-r--r-- .
    Permissions differ on "System/Library/CoreServices/Front Row.app/Contents/PlugIns/Photos.frappliance/Contents/CodeResources", should be -rw-r--r-- , they are lrw-r--r-- .
    Permissions differ on "System/Library/CoreServices/Front Row.app/Contents/PlugIns/Podcasts.frappliance/Contents/CodeResources", should be -rw-r--r-- , they are lrw-r--r-- .
    Permissions differ on "System/Library/CoreServices/Front Row.app/Contents/PlugIns/TV.frappliance/Contents/CodeResources", should be -rw-r--r-- , they are lrw-r--r-- .
    Permissions differ on "System/Library/PrivateFrameworks/BackRow.framework/Versions/A/CodeResources", should be -rw-r--r-- , they are lrw-r--r-- .
    Warning: SUID file "System/Library/PrivateFrameworks/DiskManagement.framework/Versions/A/Resources /DiskManagementTool" has been modified and will not be repaired.
    Warning: SUID file "usr/sbin/pppd" has been modified and will not be repaired.
    Warning: SUID file "usr/sbin/vpnd" has been modified and will not be repaired.
    Permissions repair complete
    another problem is, that i don't have the original install disc anymore, since i bought the mac in the us and when moving back to germany lost it.
    and how do i know wheter or not my computer meets the requirements for an update to 10.6.8?
    thanks for the input about the battery. i will definitely not buy the knockoff, have to hold out on a new battery though until i have the money for it. this wont impair the mac any further right?
    thanks again for the help

  • Help me!!!! my itunes library and play list are disappearance!!! Please!! 50gb of music!!

    Help me!!!! my itunes library and play list are disappearance!!! Please!! 50gb of music!!

    Layoff whatever drugs you are taking... they have seriously messed with your brain.
    No content shows in iTunes after updating
    iTunes 11.04 is most certainly compatible with iOS5 and previous versions of iTunes.

  • After saving the invoice, excise values are disappearing in invoice

    Hi,
    While creating invoice, we have entered all the required conditions and clicked on update button to pick new conditions
    then all the invoice values are getting updated.
    when we save the invoice and open once again the excise values are disappearing.
    net value showing without duty.
    even in the printout the excise duty values are not coming.
    your inputs & suggestions will be appreciated.
    thanks
    Regards
    Suresh.

    This is due to wrong assignment of condition types.

  • Items on my calendar are disappearing

    Dates on my IPad Calendar are disappearing and can't be found!

    Do you sync to iTUnes? In iTunes (and you can only see this with your device connected and the 'info' tab chosen) you can tell it how far back to sync events. The default used to be 30 days, which meant your device only keeps a month's worth of history around. But you can set it for longer.

  • TS4002 Having upgraded to 10.8 some emails are disappearing before I can read them.

    Having upgraded to 10.8 some emails are disappearing before I can read them.
    They are present for about a second, display as notified, but are not going to junk or Trash.
    The problem doesn't affect all emails and seems to be restricted to some senders.

    What ype of account is this (IMAP / POP)?
    Perhaps it's setup on another system (computer, mobile, etc.) and downloading there, while removing from the server. You may also have email rules moving it automatically or marking as SPAM.
    Changing your password may seem drastic but will ensure your current setup is the only one with access to downloading/archival of the email, and you can then eliminate other possibilities as mentioned above.

  • App my apps are disappearing

    since I upgraded my iPad Air wifi my apps are disappearing as they upgrade why? And how do I get them back,

    You posted to the Classic operating system forum, which refers to the operating system on Macs before 2001, and in virtualization on Macs before 2006.
    Please follow this tip on where to post:
    https://discussions.apple.com/docs/DOC-2463

  • Plug-ins are disappeared

    I use Photoshop cs6/64 bit version. since a short time all plug-ins are disappeared, nik-software as well as pt-lens. What happened? The plug-ins are correctly installed in the plugin-folder.

    When you install CS6 and CC on a 64bit windows system both the 32bit version and the 64bit versions of Photoshop are installed by default.  In CS6 there is an option not to install the 32Bit version but that is not an option in the CC installer.  You could be starting the 32bit version when your not seeing the Plug-ins.  For the 32Bit version of plug-ins are installed into the 32bit Photoshop version install tree.   Check your start button how many Photoshop start icons do you have.  Also make sure ant short cut icon you use to start Photoshop is starting the right version exe. Also make sure that file associations for image files are for the 64bit version not the 32bit version.

  • In my library for faces all names are disappeared

    Hello I have problem with my iphoto.
    Before I can write a name for any faces in all my photos. I was also able to add name in photos for any faces.
    Now I can no more and in my library all names are disappeared.
    Can anyone help my for my problem ?
    Thanks in advance.
    Nico

    I have done what you said you can see what append..... I have faces but not photos......
    If i scroll down I can see only 1 photo
    Can you Help me thanks  (excuse me for my bad english)....
    Nico72

  • IPhone 6: iMessages are disappearing

    iMessages are disappearing from my Phone, I think it has happened twice, the first time I was not sure if the messages had disappeared or if I had erased them by mistake, but then it happened again this week and this time I am certain that I didn't erase them. The other strange thing is that only the message thread between me and one person has disappeared. The problem began after I switched phone to iPhone 6 from my previous iPhone 5. Does anyone know how to fix this and how I can get the messages back into my phone? The thread is obviously still in my iCloud since the thread is in Messages on my Macbook Air.

    This happened to me twice today. Even my reply disappeared. Like you, the messages that disappeared from my iPhone 6 Plus remain on my iPad and MBP, so I know I’m not imagining things.

  • HT2497 I am finding that emails are disappearing from my Inbox without explanation.  Can anyone suggest what the problem might be?

    I am finding that emails are disappearing from my inbox without explanation.  Has anyone any ideas what might be causing this?

    I found a fix elsewhere for Mail.app.  I had to remove every sub-folder under INBOX (I moved them to a local folder) and then used the MAILBOX -> REBUILD command on INBOX.  It worked, but now I don't have any of the sub-folders.
    I am very disappointed with Apple.  I should never have to do that.  Tens of Billions of dollars in cash, just lying around, and they can't be bothered to make the most basic (and central)  of applications work.

  • Apps are disappearing off my iPhone and I can't get them back.

    Hi, apps are disappearing off my iPhone and I can't get them back. Spotify, Shazam, BBC iPlayer and the Maps app have just gone. I have tried to redownload them from the App Store but there isn't the option, cant get them back with iTunes either. Help!

    I wish it was as simple as that. I have tried to redownload them but they are marked as installed.
    I have even gone into iTunes and in the app tab untucked the disappeared apps, synced, then reticked the apps. This is where the strangest thing happens, the app appears on my iPhone, the progress bar goes from zero to the top, then, when the app should be installed, it disappears.
    So far Spotify, BBC iPlayer, the Maps app, iFooty, and probably some apps I'm not aware of are affected.
    Interestingly, the apps have also gone from my wife's iPhone which is on the same Apple I'd, but they haven't gone from my iPad which is also on the same Apple I'd.

  • Iphone 4s all apps are disappear including setting, contacts, call icon and etc. can someone help me?

    I am currently using iphone 4s , i didn't update the latest IOS 7.1 (I forgot i have updated which ios 7) . I can't go in to a particular apps, so i restart my phone. After I restart my phone, all apps are disappear including setting, contacts, and call icon and etc. can someone help me?  The phone now only remain two apps. I try to search using the phone serch engine but when i click on the result, there is a message pop out as: Unsupported URL 

    Swipe back (right to left) to the home screens that contain the rest of your apps.
    Failing that, reset the phone: hold down Sleep and Home buttons until the Apple logo is displayed.  No data is lost.

  • The images in my text messages are disappearing.

    The images in my text messages are disappearing.  Some I've sent and some I've received.  Some are weeks and weeks old, some just a couple days.  I'm using iPhone 6Plus with 8.0.2.  Any ideas what's happening here?
    Regards, John

    I have the same condition on my iPhone only. I also have an iPad, a Macbook Air and an iMac that share the same iCloud account. Messages with photos seem to work fine on all devices except my iPhone.  All of a sudden all the photos in my iPhone message streams have disappeared and been replace by question mark placeholders. I rebooted all devices, shut down messages, and rebooted, restarted, with no luck. Very bizarre and extremely frustrating. Any suggestions?

Maybe you are looking for