Results 1 to 5 of 5
  1. #1
    alpit is offline Member
    Join Date
    Feb 2015
    Posts
    1
    Rep Power
    0

    Exclamation wths wrong with this javafx code..??? netbeans 7.5

    package javafxbasics;

    import java.lang.System;
    import java.util.Random;
    import javafx.animation.KeyFrame;
    import javafx.scene.Scene;
    import javafx.scene.text.Text;
    import javafx.stage.Stage;

    int counter = 0;
    var animation = Timeline {
    repeatCount:10
    keyFrame:[
    time: 1s
    action: function()
    {
    counter = counter+1;
    }
    ]
    };
    Stage {
    title : "Alpit"
    visibal:true
    resizable: false
    width: 200
    height:100
    scene:Scene{
    content:[
    Text {
    content:bind "counter value is {counter}"
    x=70;
    y=40;
    }
    ]
    }
    }
    animation.play();


    always getting error of class.interface or enum expected.???

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    12,059
    Rep Power
    25

    Default Re: wths wrong with this javafx code..??? netbeans 7.5

    Thread moved from New to Java to JavaFX.

    Quote Originally Posted by alpit View Post
    wths wrong with this javafx code..??? netbeans 7.5
    1. Lack of uppercase letters in the subject line
    2. Misspelling of What's
    3. Posted in the wrong section
    4. Lack of code tags
    5. Non-specific subject line; see the third paragraph in the Forum Rules

    That said, why on earth are you using JavaFX 1.x? JavaFX 2 came out years ago and the present avatar is JavaFX 8, clubbed with Java 8.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,423
    Blog Entries
    7
    Rep Power
    27

    Default Re: wths wrong with this javafx code..??? netbeans 7.5

    That code doesn't look very Java-ish to me and this is a Java forum ...

    kind regards,

    Jos
    Build a wall around Donald Trump; I'll pay for it.

  4. #4
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: wths wrong with this javafx code..??? netbeans 7.5

    Quote Originally Posted by JosAH View Post
    That code doesn't look very Java-ish to me and this is a Java forum ...

    kind regards,

    Jos
    I do believe its fxscript from JavaFX 1.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    12,059
    Rep Power
    25

    Default Re: wths wrong with this javafx code..??? netbeans 7.5

    Quote Originally Posted by gimbal2 View Post
    I do believe its fxscript from JavaFX 1.
    Ayup.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. How to rewrite this code for JavaFX 2.2
    By rcbandit in forum JavaFX
    Replies: 2
    Last Post: 07-06-2013, 01:42 PM
  2. JavaFX Book | Learn JavaFX More In Depth
    By SnakeDoc in forum JavaFX
    Replies: 0
    Last Post: 05-17-2013, 11:10 PM
  3. What is wrong with my code????
    By maneatingbaby in forum New To Java
    Replies: 2
    Last Post: 12-31-2010, 06:06 PM
  4. JavaFX Script and JavaFX Mobile
    By levent in forum Java Software
    Replies: 1
    Last Post: 01-27-2010, 04:48 PM
  5. What's wrong with this code?
    By Wizard wusa in forum New To Java
    Replies: 14
    Last Post: 01-22-2008, 11:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •