Slowly but surely figguring out Canvas

Hey, it's me again. still workin on the same problem as the last ten thousand times I put up a problem in the forum. Here's my code:
//: Applet1.java
// first attempt at putting a picture onto an applet.
import java.awt.*;
import java.applet.*;
class Info extends Canvas {
     Graphics picture;
     public void Info() {repaint();}
     public void paint(Graphics g) {
          picture = g;
          g.setColor(new Color(255, 255, 255));
          g.drawString("HI!!!", 10, 10);
public class Applet1 extends Applet {
     public void init() {
          // setLayout(new BorderLayout());
          Canvas pic = new Info();
          add("Center", pic);
Ok. I need to know why this doesn't draw the String "HI!!!" on the Applet. I think it has something to do with the fact that paint isn't being called. I'm not completely sure of the way that the entire paint() repaint() thing works.
Sincerely,
~ Nesho

If you add a System.out.println in your paint method, you can see it in your java console if the paint method is ever being called. You can also check that the canvas has a size, but with borderlayout it should get the whole applet size, so that should not be the problem. Try with Color.black or use the default color.

Similar Messages

  • I've just updated itunes and it has disappeared from my PC- the previous shortcut won't work and it can't locate on my file search- this is the second time this has happened when updating itunes- APPLE you're going donw the tubes slowly but surely..

    I've just updated itunes and it has disappeared from my PC- the previous shortcut won't work and it can't locate on my file search- this is the second time this has happened when updating itunes- APPLE you seem to be going down the tubes slowly but surely..

    its not apple going "down the tubes" its that you have windows junk.  These opinion best left at apple.com/feedback
    you need to completely uninstall itunes and all components
    see these for help
    http://support.apple.com/kb/HT1925
    http://support.apple.com/kb/HT1923
    Peace, Clyde

  • Create Database - Slowly but surely!!

    I am regularly asked to make new databases. Database creation takes ages and ages using the Database Configuration Assistant - which appears to be the easiest way of doing it.
    The only quick way (not actually very quick - compared to SQL Server say, but anyway) seems to be to copy from the CD in the DBCA.
    It seems to take about an hour just to add JServer onto the database according to the DBCA as it runs through (and InterMedia isn't quick either). Total db creation times varies between 2 and 3 hours on a decent box.
    My questions:
    Why is this?
    Can I do anything about it? (apart from obviously removing options I don't need such as advanced replication)
    Thanks
    Jason.

    Thanks for replying!
    I tried this and it did indeed seem faster (still pretty slow, but definitely an improvement).
    Scripts must be pretty horrid though - plenty of nice error messages output (object doesn't exist to remove messages in response to DROP commands at a guess). I guess we just don't see that when the DBCA does its stuff behind the scenes!
    Seems worthwhile.
    Thanks
    Jason.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Shah Nawaz ([email protected]):
    jason.
    although your question is valid, but there is nothing to speed the process, unless you want to save the dbcreation file as a script and then run it..that is where you could gain performance..during installation..
    Since DBassist required a huge SGA, anything running under java console..is just slow in general, again it depends on you hardware also...
    I have noticed that rather then using the DBassist to create your database simply save it as a script and then run the script accordingly...
    you will be suprise how much performance gain you get..
    let me know if this works out for you
    shah<HR></BLOCKQUOTE>
    null

  • Slowly but surely..finally approved for BofA

    I'm new to this forum, but I have been following for several years. I really want to thank everybody for sharing their experiences and advice. I hope that my story will help others just the same as you have all helped me...n I'd like to apologize ahead for the super long essay lol ;P During my sophmore year in college, I messed up big time on racking thousands of dollars on credit card debt and losing my job. 4 accts ended up in derog (prob around 10k), so my mid 700's dropped to the low 500's. I still had a few retail cards open and good standing student loans, but I had to kiss all my major cc's goodbye. 3 yrs later, I decided to start my journey on rebuiling my credit. I received a preapproval letter from Cap1 and figured I had nothing to lose. I was approved for the Cap1 Platinum MC with an initial 500CL and 22.90% APR w/ an auto CLI to 2500 after 5 months w/ heavy util. 1 yr later, i was approved for an auto loan through Cap1 w/ 6.96% APR. Couple months after that, I applied for the Cap1 Journey Visa and was approved with 500CL and 22.90% APR w/ auto CLI to 750 after 5 months and another auto CLI to 2750 after an additional 5 months. Cap 1  upgraded my Platinum MC to Quicksilver MC shortly after getting the Journey Visa. I know lots of people have their gripes against Cap1, but wow, they really provided a platform to improve without paying any AF's. High interest, but I made sure to PIF after the 0% promotional periods ended. I'd highly recommend Cap1 as a rebuilder as long as you can manage your finances well since 22% APR would cost a lot in interest. After babysitting my credit score for a year, I was so hesistant to apply for the BofA Cash Visa. I recently saw an "invitation to apply" through my online banking and decided to jump the gun. I was approved on spot with a 500CL and 17.99% APR. I'm a bit disappointed that the CL is so low, but so glad to have a "prime" lender approve me. Hopefully BofA will do an auto CLI after a year. *cross my fingers* So after 3 years of careful planning, my score is now steady at 655 (idk my score didn't change after BofA's HP), for EXP and TU. I'm not planning to apply for anymore CC's, but starting to consider if I should do an auto refi. All of my baddies are scheduled to drop in one year, so my ultimate goal would be to be back in the 700's so that I can eventually buy a house. Of course my baddies dropping will help, but are there any other recommendations to increase my score? Thanks and wish me luck!

    pbnjenn27 wrote:
    I'm new to this forum, but I have been following for several years. I really want to thank everybody for sharing their experiences and advice. I hope that my story will help others just the same as you have all helped me...n I'd like to apologize ahead for the super long essay lol ;P During my sophmore year in college, I messed up big time on racking thousands of dollars on credit card debt and losing my job. 4 accts ended up in derog (prob around 10k), so my mid 700's dropped to the low 500's. I still had a few retail cards open and good standing student loans, but I had to kiss all my major cc's goodbye. 3 yrs later, I decided to start my journey on rebuiling my credit. I received a preapproval letter from Cap1 and figured I had nothing to lose. I was approved for the Cap1 Platinum MC with an initial 500CL and 22.90% APR w/ an auto CLI to 2500 after 5 months w/ heavy util. 1 yr later, i was approved for an auto loan through Cap1 w/ 6.96% APR. Couple months after that, I applied for the Cap1 Journey Visa and was approved with 500CL and 22.90% APR w/ auto CLI to 750 after 5 months and another auto CLI to 2750 after an additional 5 months. Cap 1  upgraded my Platinum MC to Quicksilver MC shortly after getting the Journey Visa. I know lots of people have their gripes against Cap1, but wow, they really provided a platform to improve without paying any AF's. High interest, but I made sure to PIF after the 0% promotional periods ended. I'd highly recommend Cap1 as a rebuilder as long as you can manage your finances well since 22% APR would cost a lot in interest. After babysitting my credit score for a year, I was so hesistant to apply for the BofA Cash Visa. I recently saw an "invitation to apply" through my online banking and decided to jump the gun. I was approved on spot with a 500CL and 17.99% APR. I'm a bit disappointed that the CL is so low, but so glad to have a "prime" lender approve me. Hopefully BofA will do an auto CLI after a year. *cross my fingers* So after 3 years of careful planning, my score is now steady at 655 (idk my score didn't change after BofA's HP), for EXP and TU. I'm not planning to apply for anymore CC's, but starting to consider if I should do an auto refi. All of my baddies are scheduled to drop in one year, so my ultimate goal would be to be back in the 700's so that I can eventually buy a house. Of course my baddies dropping will help, but are there any other recommendations to increase my score? Thanks and wish me luck!A single HP actually seldom affects scores unless there are already a LOT of them.

  • Painting the outer canvas background?

    I would like to change the colour of my outer canvas how is this done? I thought I could just pick a colour and with my paint bucket tool and double click on the outer canvas but nothing happens?
    Basically i would like the outer canvas to be the same colour as the main page.
    I am using photoshop Cs3 extended for Mac OSX 10.4
    lister

    right-click (or command-click) in the outer canvas, and watch for the pop-up menu options.

  • HT1918 Hi - I think I have different apple devices recorded under different apple IDs. Now I would like to consolidate all the devices under one Apple-ID.  I have tried to do this going through the manage accoung like, but it timed out - could somebody he

    Hi - I think I have different apple devices recorded under different apple IDs. Now I would like to consolidate all the devices under one Apple-ID.  I have tried to do this going through the manage accoung like, but it timed out - could somebody help, pls

    Purchases of multple Apple ID accounts cannot be merged as noted here >  Frequently asked questions about Apple ID

  • I am trying to set up my apple tv on a sony KDL - 40xbr4. The remote is a sony RM-V302. I plugged it into the HDMI IN on the side of the TV but cannot find out how to get to that input. I am at a winter rental property and brought my Apple TV with me.

    I am trying to set up my apple tv on a sony KDL - 40xbr4. The remote is a sony RM-V302. I plugged it into the HDMI IN on the side of the TV but cannot find out how to get to that input. I am at a winter rental property and brought my Apple TV with me. I did check internet for solutions. The instructions I found said to use a "home button" on the remote.  There isn't one. I sure would appreciate help if someone knows a solution.  My first post - hope I did this right.

    if its anything like my Sony, theres a button top left corner that upon each press i get an audible bleep and the AV inputs come up on screen, i then cycle down to whichever input i wish to select!
    in case your remote is different, the button on my remote has a square with a slightly smaller square just overlapping the first square.
    hope that helps?
    rgds Lee.

  • Can I do a clean install of Lion, onto my Mac Book Pro4,1, that is currently running 10.5.8? I have seen U-tube videos on how to do a clean install to Snow Leopard, and another from SL to Lion, but can zero out my HD, and do a clean install to Lion?

    Can I do a clean install of Lion, onto my Mac Book Pro4,1, that is currently running 10.5.8? I have seen U-tube videos on how to do a clean install to Snow Leopard, and another from SL to Lion, but can zero out my HD, and do a clean install to Lion?

    See this article.

  • Iphoto keeps dropping out. Sometimes other programs do too such as Software Update. They other programs seem to drop randomly but iPhoto drops out constantly. Is there a solution?

    iPhoto constantly keeps dropping out. Other programs do at times but iPhoto drops out constantly. Does anyone know what causes this?

    Apply the two fixes below in order as needed:
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Select the options identified in the screenshot. 
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    Download iPhoto Library Manager and launch.
    Click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    Now that the library is listed in the left hand pane of iPLM, click on your library and go to the Library ➙ Rebuild Library menu option
    In the next  window name the new library and select the location you want it to be placed.
    Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments but not books, calendars or slideshows. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    OT

  • My ipod touch is disabled, i installed the latest version of itunes, but cant figure out how to restore, can anyone help with this?

    My ipod touch is disabled, i installed the latest version of itunes, but cant figure out how to restore the ipod, can anyone help?

    If you run into the "another installation" message even after the reboot of the PC (which is an excellent idea by HTP ProXy), reregistering your Windows Installer Service is worth a try.
    First, launch a command prompt as an administrator. In your Start search, type cmd then right-click on the cmd that comes up and select "Run as administrator".
    At the command prompt:
    Type %windir%\system32\msiexec.exe /unregister and hit enter.
    Type %windir%\syswow64\msiexec.exe /unregister and hit enter.
    Type %windir%\system32\msiexec.exe /regserver and hit enter.
    Type %windir%\syswow64\msiexec.exe /regserver and hit enter.
    Restart the PC and try another reinstalll.

  • Hp Officejet Pro 8500 Q910a looks like it is printing and copying but pages come out blank.

    Hp Officejet Pro 8500 Q910a looks like it is printing and copying but pages come out blank. I have used genuine HP cartridges. All four cartridges have have over 40% ink levels as per Self Test Diagnostic page.Printhead diagnostic says the print heads are "GOOD". Scanner  works fine.  Self Test Diagnostic Page prints in PINK color.Print quality TEST does not have black print on page.Printing and phot copying all come out blank.HELP.

    Hi Equi_nut,
    Do you have the same printer as the user above? 

  • Opening a new file in photoshopcc and the file name is displayed but no white working canvas. you can see it as a layer in the layers panel and if i draw on the grey area i can see int on the layer but not on the main screen.

    opening a new file in photoshop cc and the file name is displayed but no white working canvas. you can see it as a layer in the layers panel and if i draw on the grey area i can see int on the layer but not on the main screen.

    Graphics card is the problem.
    Trying to update drivers now.
    Thanks for your help
    john

  • I had to change my Hard Drive, now I want to work on files in iWeb, but can't access Time Machine before yesterday. The dates are there on the right hand side but are greyed out before yesterday when I changed my HD. How do I access anything from before.

    I had to change my Hard Drive, now I want to work on files in iWeb, but can't access Time Machine before yesterday. The dates are there on the right hand side but are greyed out before yesterday when I changed my HD. How do I access anything from before?

    Start with B5/6 in the 1st linked article.
    Time Machine Troubleshooting
    Time Machine Troubleshooting Problems

  • I tried updating my iPhone3g through itunes. Now i'm stuck in recovery mode and i've EVERYTHING even websites and such but nothing worked out! I've also tried restarting and fiddling with the home button but nothing still worked. Please help!

    I tried updating my iPhone3g through itunes. Now i'm stuck in recovery mode and i've EVERYTHING even websites and such but nothing worked out! I've also tried restarting and fiddling with the home button but nothing still worked. Please help! What should I do??

    Well, if you've indeed tried EVERYTHING, then you'll need to bring your phone to Apple for evaluation.

  • I have a new iMac running iTunes 10.4 in OS 10.6.8, and a new Mac Air running iTunes 10.4 in Lion.  I was able to transfer all my music etc. from the iMac onto the Air, but cannot figure out how to get the Playlists from the iMac to the Air.  iTunes Help

    I have a new iMac running iTunes 10.4 in OS 10.6.8, and a new Mac Air running iTunes 10.4 in Lion.  I was able to transfer all my music etc. from the iMac onto the Air, but cannot figure out how to get the Playlists from the iMac to the Air.  iTunes Help says File >Library >Export playlist and choose XML, or to save a copy of all your playlists, File > Library > Export Library, "the Exported info is saved in XML format."  Then it says, "to import an iTunes playlist, File > Library > Import Playlist".  Now I am assuming I do that import part on the Air, but when I try it doesn't recognize anything that can be imported - what am I missing??? Aside from a clue...

    Thanks, Jim, for taking the time, but the reply is unfortunately vague in the exact area of my confusion!  "you need to copy that file to your new computer..."  Well, the Import/Export instructions make it seem as if the two computers should be able to communicate this file thru wifi, but that's the linkage I can't seem tocreate with Import/Export.  Should I instead email a copy to myself (thats what applecare suggested)?  Copy it to and from a thumb drive?  But then place the file where?  And the article was helpful, but should I be trying to move the Library file or the Library.xml file (as iTunes Help suggests)?  Sorry to be so clueless about it...I suppose I buy Apple in the hopes of not having to think about this stuff, which approach seems not to be serving me well. Thanks again for your time!

Maybe you are looking for