Applet see nothing

Hello
I can see nothing after the applet started... only a blue screen. Can somebody tell me where is the problem? It must draw a tree...but i can see only a blue screen
Thank you!
Regards
import java.awt.*;
import java.applet.*;
public class Lindenmayer extends Applet{
     Point a,b;
     int lengthF=3; //pas
     double direction;
     double rotation=30.0;
     Graphics g;
     Graphics2D g2;
     public void init(){
          setBackground(new Color(200,255,255));
     public void paint(Graphics g){
          g2=(Graphics2D) g;// anti aliasing
          g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                   RenderingHints.VALUE_ANTIALIAS_ON);
          g2.setColor(new Color(255,0,255));
          a=new Point(200,495); 
          direction=-60;         //dir start
          turtle(g2,"F",5);
     public void turtle(Graphics g2, String instruc, int depth){
          if(depth==0) return;
          depth-=1;
          Point aMark=new Point(0,0);
          double directionMark=0;
          char c;
          for(int i=0;i<instruc.length();i++)
               c=instruc.charAt(i);
               if(c=='F')
                    turtle(g2,"F[+F]F[-F]F",depth);
                    if(depth==0)
                         double rad=2.0*Math.PI*direction/360.0;
                         int p=(int)(lengthF*Math.cos(rad));
                         int q=(int)(lengthF*Math.sin(rad));
                         b=new Point(a.x+p,a.y+q);
                         a=b;
               else if(c=='+') direction+=rotation;
               else if(c=='-') direction-=rotation;
               else if(c=='[') {aMark=a; directionMark=direction;}
               else if(c==']') {a=aMark; direction=directionMark;}
}

You don't know how to draw? Read the javadoc for [Graphics2D|http://java.sun.com/javase/6/docs/api/java/awt/Graphics2D.html] and you'll find the drawLine method.
Kaj

Similar Messages

  • Purpose: to create photo galleries to insert or not items: 1) with phocagalery, it works 2) with the transfer via lightroom, I do not see the downloaded files but if I want to create a directory folder with the same name, he said he is already, I see noth

    purpose: to create photo galleries to insert or not items:
    1) with phocagalery, it works
    2) with the transfer via lightroom, I do not see the downloaded files but if I want to create a directory folder with the same name, he said he is already, I see nothing in the media in content management
    Can you help me

    Mahsa21,
    We are glad that we were able to resolve the international calling plan issue for you.  If you need assistance,please  reach out to us.
    thanks,
    Tonya D.

  • After Photoshop Elements quit working for the second time in three months, I uninstalled it and now cannot get it to reinstall from the disc. Nothing happens when I insert the disc. All I can do is look at the folders and files and see nothing that tells

    After Photoshop Elements quit working for the second time in three months, I uninstalled it and now cannot get it to reinstall from the disc. Nothing happens when I insert the disc. All I can do is look at the folders and files and see nothing that tells me how to start the installation. Clicking "open with Auto play" gives me irrelevant options, view photos, share, etc. I'm running Windows 8. This program has worked, although buggy, for the past year.

    reinstall by clicking setup on your disk or downloading and installing,
    Downloads available:
    Suites and Programs:  CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  12 | 11, 10 | 9,8,7
    Lightroom:  5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • By asking for the function seek and replace [apple F] i get no display - so see nothing except the upper stroke. what is going on? and what can i do about it?

    by asking for the function seek and replace [apple F] i get no display - so see nothing except the upper grey line. what is going on? and what can i do about it?
    restarting doesn't work

    Does trashing the preferences help? See Replace Your Preferences

  • I can't see nothing in my ZEN V P

    Hi,
    for no reason, I opened my Zen V plus I couldnt see nothing. The blue turns all black, and I only can see something in orange, and the letters are mixed on the screen. For example, I can see in the menu, the word ZEN from the beginning.
    What can I do?
    is very strange, I need help, please
    thank u very much

    The lowest you can set the contrast to is 0%. You can see this in a dark room. Also, the start up splash screen is always about 60% for a few seconds before your chosen contrast level is set.
    So, go into a dark room.
    Switch on your player.
    () Do the Play and Back buttons light up blue briefly?
    (2) Do you see a 'Creative' splash screen before the display goes dark?
    (3) When you operate any buttons, do the Play & Back buttons light up?
    The light behind the play & back buttons is dim - hard to see if you are not in a dark place.
    If () is no, either the battery is completely flat or the player is dead. Leave it on charge for 6 hours & try again. If that fails, take it back to the retailer or talk to Creative Customer support.
    If () yes, (2) yes, maybe the contrast is right down & you need a darker room! Or there is something else wrong. Try upgrading the firmware. If that fails, take it back to the retailer or talk to Creative Customer support.
    If () yes, (2) no, (3)yes, the display is dead. Take it back to the retailer or talk to Creative Customer support.
    If () yes, (2) no, (3) no, your player is probably dead, but it might be worth trying to upgrade the software before giving up.

  • I know my network connection is fine and I've checked all the cables and that the tv is set to the correct source, but even though Apple Tv is on and responds with beeps when I hit the button, I see nothing on the screen. What do I do next?

    I know my network connection is fine and I've checked all the cable connections and my television is set to the correct input, but even though the remote beeps when I hit the button, I see nothing on the screen. The troubleshooting section in the setup guide says to make sure that Apple Tv is connected to my network by choosing Settings>General>Network. How do I do this? What do I need to do to get everything back? I've been using the Apple tv for a while now, and suddenly it's doing this.

    This is the iPod touch forum. I requested your posted be moved to the Apple TV forum
    Using Apple TV

  • Open creative cloud... but see nothing... Windows 8.0

    Hello have the creative cloud open... but see nothing... Please help...

    BLANK Cloud Screen http://forums.adobe.com/message/5484303 may help
    -and step by step http://forums.adobe.com/thread/1440508?tstart=0
    -and http://helpx.adobe.com/creative-cloud/kb/blank-white-screen-ccp.html
    or
    Creative Cloud chat support (all Creative Cloud customer service issues)
    http://helpx.adobe.com/x-productkb/global/service-ccm.html

  • Hello!!! I have my I phone screen all black and I cannot see nothing!! do you know or do you have an idea about what's happened?

    hello!!! I have my I phone screen all black and I cannot see nothing!! do you know or do you have an idea about what's happened?

    Connect your phone to the wall socket and press and hold display off and on button along with home button for over 10 seconds till Apple logo appears.

  • How could I import the photos I took in iPhone into Aperture 3?  I see nothing when I connect my iPhone to my Mac..

    How could I import the photos I took in iPhone into Aperture 3?  I see nothing when I connect my iPhone to my Mac..
    iPhoto isn't working neither..

    I see nothing when I connect my iPhone to my Mac.
    Does your Mac not recognize the device? Or is the iPhone recognized, but the import panel does not show any images to import? Is your Photo Stream turned on?
    There is a known bug with PhotoStream and AP 3.2.1.
    Do you have the current Aperture version 3.2.2? If not, upgrade to 3.2.2.
    See this: http://aperture.maccreate.com/2011/12/12/aperture-3-2-2-addresses-hidden-photost ream-issue/

  • Ok so my new iPod Classic is repeatedly restarting itself and I see nothing on the screen But the Apple logo and I canny do anything to stop it can anybody help me

    Ok so my new iPod Classic is repeatedly restarting itself and I see nothing on the screen But the Apple logo and I canny do anything to stop it can anybody help me

    Try the DFU Restore method shown in Corrupt iPod classic.
    tt2

  • HT201210 After latest update my iPad (no camera) screen went dark (dim) & blank. Once voice said setup incomplete. Tried reset does nothing. Home screen/wifi setup appeared for moment. Hear swipe see nothing!HELP

    After latest update my iPad (no camera) screen went dark (dim) & blank. At first I could not power off. At some point voice said setup incomplete. In every language. Took someones advise turned off voice over in itunes.. that stopped the voices. itunes identifies and syncs but ipad screen remains blank (dimly lit). Home screen appeared for moment couple of times as well as wifi setup but disappeared as soon as i started to enter info. Hear swipe see nothing! HELP!

    adetoye50 wrote:
    Dear Contacts Journal Support Team,
    FYI, this is a user to user support forum.  You are NOT addressing Apple here.
    Honestly, I doubt anyone is really going to take the time to read the novel you have written.

  • See nothing then watching movies on t420s with 1600x

    I see almost nothing then I watching movies on t420s with 1600x 900 screen  No any other laptops, even very old ones didn`t has such issue.  Why the screen is so poor quality and what i can do with this?  

    So the laptop and screen works otherwise, but the movies are too dim? 
    Are your divers updated? What program are you using to watch the movies?
    When asking for help, post your question in the forum. Remember to include your system type, model number and OS. Do not post your serial number.
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help others with the same question in the future.
    My TPs: Twist 2HU: i5-3317U Win 8 Pro, 4GB RAM 250GB Samsung 840 | T420 4177CTO: i5-2520M, HD+, Win 7 Pro x64, 8GB RAM, Optimus, 160GB Intel 320 SSD, Intel 6300 WiFi, BT 3.0 | T400 2764CTO: P8700, WXGA, Win 7 Ult x64, AMD 3470, 8GB RAM, 64GB Samsung SSD, BT, Intel 5300 WiFi | A20m 14.1" PIII 500 (retired). Monitors: 2x Dell U2211h IPS 100% sRGB calibrated w/ Spyder3.

  • TS5326 I see nothing in iBooks on OS X Mavericks

    I have new MacBook with iBooks preinstalled on Mavericks.
    Also I have iPad where I have a lot of manually uploaed books (pdf, epub). When I migrate from one iPad to new one - all books restored on my new device. It's amazing!
    But on my MacBook I se nothing. I signed in to iBooks Mac app with the same account. But books isn't appear here.
    Please tell me how can I get all my books from my collection? The same, that I already have on my iPad that synched with iCloud.
    Thanks!
    P.S. All my documents in Pages synched well on both iPad and MacBook. I signed in to iCloud as well. :-)
    P.P.S. I see names of collections that I created before on tab Collections. But all my collections are still empty.
    P.P.S. I see names of collections that I created before on tab Collections. But all my collections are still empty.

    I created updates version of this problem in new thread for Yosemite here - Books from iPad don't come to MacOS

  • Recompile Applet, see old vers in browser

    I am developing an Applet.
    I make changes to the code.
    I recompile it successfully.
    I load its' associated HTML file into my browser (IE6).
    Instead of seeing the new version, I see the old.
    I have clicked on 'Tools', then 'Internet Options...', then the button 'Delete Files...', checked the box 'Delete all offline content', and 'Okay'ed everything, but I still see the old version.
    What am I missing? Please help. Thx.

    From the original author:
    Thanks to all for your input. The Duke Dollars were awarded to user 'jajenkins', who hit the nail on the head. Using the Java Console is the easiest and best way to force the latest and greatest version of you under-developement applet into the browser.
    Here's how it worked for me.
    Using Internet Explorer 6 and Java Plug-in 1.4.
    In IE6, choose menu item 'View', submenu item 'Java Console'. A Java console for the Microsoft VM appears, and at the same time, an icon appears in the systray for the Java Plug-in Java Console (looks like a steaming cup of java, of course). Close the Microsoft VM Java Console, as it is useless. Double-click the systray icon - the Java Plug-in Java Console appears. When you have a modified and recompiled applet ready, navigate off the document containing the old version of your applet, type 'x' in the Java Console, then navigate back to the applet containing document. Vwala - your new applet, running just the way you coded it. No more need to clear the temporary internet files cache. No need to close any browser instances.
    Again, thanks to 'tajenkins', and to all other contributors :)

  • Why do I see nothing?

    Here is my code. I do not understand why I can not see my Buttons or text boxes. Any clues why. I compiles properly, no errors. Thanks for the help.
    import java.applet.*;
    import java.awt.*;
    import java.awt.Graphics;
    import javax.swing.*;
    import java.awt.event.*;
    import java.net.*;
    import java.lang.Thread.*;
    public class BSort extends JApplet
         implements ActionListener {
         JTextField tf;
         JLabel l;
         JButton b1, b2;
         public void init() {
              JButton b1 = new JButton("b1");
              b1.setVerticalTextPosition(AbstractButton.CENTER);
         b1.setHorizontalTextPosition(AbstractButton.LEFT);
              JButton b2 = new JButton("b2");
              b1.addActionListener(this);
              b2.addActionListener(this);
              tf = new JTextField(" "); // can be JLabel or JTextArea
              l = new JLabel();
              JPanel pane = new JPanel();
              pane.add(b1);
              pane.add(b2);
              pane.add(tf);
              pane.add(l);
              pane.setVisible(true);
              b1.setVisible(true);
              b1.setEnabled(true);
         public void actionPerformed(ActionEvent aE) {
              String actionCommand = aE.getActionCommand();
              String text = "";
              if(actionCommand.equals("b1")==true) {
              text = tf.getText();
              else if(actionCommand.equals("b2")==true) {
                   l.setText(text);
    }

    It is possible to add() to a panel that is sat within a JApplet. Although, as the man says, at the top level, you will need to use getContentPane().add() to put the panel in the applet in the first place. If you have more than one panel that you want to add to a JApplet top-level, then instantiate:
    Container cPane = getContentPane();
    and add stuff to that...

Maybe you are looking for

  • Excise Invoice at Depot for Initial Inventory Uploads

    Hi, >we are rolling out a new plant for which we have old stocks which were done with the Movement type "561".We want to do Excise invoice at depot using the T.Code J1IG.but we dont have corresponding excise invice at Factory.Please advice is there a

  • Runcluvfy.sh stage pre fails with node reachability on 1 node only

    Having a frustrating problem. 2 node RAC system on RHEL 5.2 installing 11.2.0.1 grid/clusterware. Performing the following pre check command from node 1: ./runcluvfy.sh stage -pre crsinst -n node1,node2 -verboseI'm getting the following error and it

  • Is this repairable

    My HP PSC2410 Photosmart All-in-One usb port is broken where it was soldered to the circuit board.  All the other functions scanning, copying and faxing work beautifully.  Is this a  problem that costs little enough to make it worthwhile to repair an

  • My MacAir wakes up from sleep mode frozen

    and when I move the cursor, it drags a grey line that erases the screen. I had the track pad replaced but still have the problem.. what doi you thin is going on?

  • PO MORE THAN 100 CR

    I  WANT TO  CREATE THE PO OF VALUE MORE THAN 100 CR BUT SYSTEM GIVING ERROR MESSAGE VALUE OF SERVICE ITEM EXCEED THE ALLOWED VALUE LIMIT. PL GIVE THE SOL'N