Sth like textbox in canvas class? help me!!!

i am trying to write a code in canvas class which must work like a textbox in high level...
i've done sth but i 've got some basical deficiencies. i can not delete a previous character and i have to have sth like a cursor or pointer to move backwards and-or forward
help me!!!

i am trying to write a code in canvas class which
must work like a textbox in high level...
i've done sth but i 've got some basical
deficiencies. i can not delete a previous character
and i have to have sth like a cursor or pointer to
move backwards and-or forward
help me!!!I asked my crystal ball to show me your code but all it did was indicate that you're doomed.

Similar Messages

  • Calling a function from another class - help!

    I realize that this is probably a basic thing for people who have been working with JavaFX for a while, but it is eluding me, and I have been working on it for over a week.
    I need to call a function that is in another class.  Here's the deal.  In EntryDisplayController.java, there are 2 possible passwords that can be accepted - one will give full access to the car, the second will limit functions on the car.  So when a password is entered and verified as to which one it is, I need to call a function in MainDisplayController.java to set a variable that will let the system know which password is being used - full or restricted.
    So in MainDisplayController.java I have this snippet to see
    public class MainDisplayController implements Initializable, ControlledScreen {
        ScreensController myController;
        public static char restrict;
         * Initializes the controller class.
        @Override
        public void initialize(URL url, ResourceBundle rb) {
            // TODO
        public void setRestriction(){
            restrict = 0;
            restrictLabel.setText("RESTRICTED");
        public void clearRestriction(){
            restrict = 1;
            restrictLabel.setText("");
    And in EntryScreenDisplay.java I have this snippet:
    public class EntryDisplayController implements Initializable, ControlledScreen {
         @FXML
        private Label passwordLabel ;
        static String password = new String();
        static String pwd = new String("");
         ScreensController myController;
         private MainDisplayController controller2;
         * Initializes the controller class.
        @Override
        public void initialize(URL url, ResourceBundle rb) {
            setPW(pwd);    // TODO
         @FXML
        private void goToMainDisplay(ActionEvent event){
            if(password.equals ("123456")){
              controller2.clearRestriction();
               myController.setScreen(ScreensFramework.MainDisplayID);
               pwd = "";
               password = "";
               setPW(pwd);
            else if(password.equals ("123457")){
               controller2.setRestriction();
                myController.setScreen(ScreensFramework.MainDisplayID);
               pwd = "";
               password = "";
               setPW(pwd);
            else{
                password = "";
                pwd = "";
                setPW(pwd);
    When I enter the restricted (or full) password, I get a long list of errors, ending with
    Caused by: java.lang.NullPointerException
      at velocesdisplay.EntryDisplayController.goToMainDisplay(EntryDisplayController.java:60)
    Line 60 is where "controller2.setRestriction(); is.
    As always, thanks for any help.
    Kind regards,
    David

    You never set the controller2 variable to anything, which is why you get a null pointer exception when you try to reference it.
    public static variables (and even singletons) are rarely a good idea as they introduce global state (sometimes they can be, but usually not).
    If a static recorder like this can only have a binary value, use a boolean, if it can have multiple values, use an enum.
    Some of the data sharing solutions in dependency injection - Passing Parameters JavaFX FXML - Stack Overflow might be more appropriate.
    I also created a small framework for roll based solutions in JavaFX which perhaps might be useful:
    http://stackoverflow.com/questions/19666982/is-there-a-way-to-implement-a-property-like-rendered-on-javafx
    https://gist.github.com/jewelsea/7229260
    It was just something I hacked together, so it's not a fully polished solution and you probably don't need something quite so complex.
    What you need is a model class shared between the components of your application.  Dependency injection frameworks such as afterburner.fx can help achieve this in a fairly simple to use way.
    If you don't want to go with a dependency injection framework, then you could use either a static singleton model class for your settings or pass the model class using the mechanism in defined in the passing parameters link I provided.  For a model class example, see the ClickCounter class from this example.   That example doesn't use FXML, but to put it together with the passing parameters solution, for your restriction model, you would have something like the following:
       private class Restricted {
         private final ReadOnlyBooleanWrapper restricted;
         public Restricted(boolen isRestricted) {
           restricted = new ReadOnlyBooleanWrapper(isRestricted);  
         public boolean isRestricted() {
           return restricted.get();
         public ReadOnlyBooleanProperty restrictedProperty() {
           return restricted.getReadOnlyProperty();
    Then in your EntryDisplayController you have:
    @FXML
    public void goToMainDisplay(ActionEvent event) {
         // determine the restriction model as per your original code...
         RestictionModel restrictionModel = new RestrictionModel(<appropriate value>);
      FXMLLoader loader = new FXMLLoader(
      getClass().getResource(
       "mainDisplay.fxml"
      Stage stage = new Stage(StageStyle.DECORATED);
      stage.setScene(
       new Scene(
         (Pane) loader.load()
      MainDisplayController controller =
        loader.<MainDisplayController>getController();
      controller.initRestrictionModel(restrictionModel);
      stage.show();
    class MainDisplayController() {
      @FXML private RestrictionModel restrictionModel;
      @FXML private RestrictLabel restrictLabel;
      public void initialize() {}
      // naming convention (if the restriction model should only be set once per controller, call the method init, otherwise call it set).
      public void initRestrictionModel(RestrictionModel restrictionModel) {
        this.restrictionModel = restrictionModel;
         // take some action based on the new restriction model, for example
        restrictLabel.textProperty.bind(
          restrictionModel.restrictedProperty().asString()
    If you have a centralized controller for your navigation and instantiation of your FXML (like in this small FXML navigation framework), then you can handle the setting of restrictions on new screens centrally within the framework at the point where it loads up FXML or navigates to a screen (it seems like you might already have something like this with your ScreensController class).
    If you do this kind of stuff a lot, then you would probably benefit from a move to a framework like afterburner.  If it is just a few times within your application, then perhaps something like the above outline will give you enough guidance to implement a custom solution.

  • How put PageItems like textbox as placeholders in an image in a region?

    I have this problem that I am facing in an application that I am building.i have read your article that you presented in the oracle users conference in November 2007 “Steal the Show with Apex” but the problem comes to this.
    a)     I have an image that has placeholders for information display. I would like to distinctly put the page items directly at where the placeholders are in the image. Was wondering how to do this . I have already set the fields for where the placeholders are to be for loading information from the database. The question is this if possible how do I do this.? With this fact that I have edit the region template to put the sample code u see below there
    Thanks hope to hear from you soon thanks
    This is a sample of home the place holder looks like.
    SAMPLE
    ==================
    <div align="left" id="voter_card">
    <table width="448" height="263" border="0" cellpadding="0" cellspacing="0" background="#APP_IMAGES/voter_id_real.jpg">
    <tbody><tr>
    <td height="45" colspan="3"> </td>
    <td colspan="8"> </td>
    <td width="159"> </td>
    </tr>
    <tr>
    <td height="40" colspan="3"> </td>
    <td width="34" align="right" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
    <td width="25" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
    <td width="24" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
    <td width="24" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
    <td width="23" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
    <td width="20" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
    <td width="26" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
    <td width="30" valign="bottom"><strong> </strong></td>
    <td rowspan="6" valign="top"><table width="133" border="0" cellspacing="2" cellpadding="0">
    <tbody><tr>
    <td width="42" height="28"> </td>
    <td width="42"> </td>
    <td width="41"> </td>
    </tr>
    <tr>
    <td height="158" colspan="3" align="center"><img src="../gvive_java/gvive_imgs/61/22081761000.jpg" width="124" height="143" alt="Photo"></td>
    </tr>
    </tbody></table></td>
    </tr>
    <tr>
    <td height="36" colspan="3"> </td>
    <td colspan="8" rowspan="3" align="center" valign="bottom"><span class="style5">PLACE HOLDER 1</span></td>
    </tr>
    <tr>
    <td width="53" height="31" align="right" valign="middle"><strong>2</strong></td>
    <td width="7"> </td>
    <td width="23" align="left" valign="middle"><strong>1</strong></td>
    </tr>
    <tr>
    <td height="24"> </td>
    </tr>
    <tr>
    <td height="19" align="right" valign="top"><strong>M</strong></td>
    <td height="19"> </td>
    <td height="19"> </td>
    <td colspan="8" align="center" valign="bottom"> </td>
    </tr>
    <tr>
    <td height="51" colspan="3"> </td>
    <td height="51" colspan="8" align="center" valign="middle"><strong>PLACE HOLDER 1 </strong></td>
    </tr>
    <tr>
    <td height="5" colspan="12"> </td>
    </tr>
    </tbody></table>
    </div>
    Hope you have an idea of what I am saying, please feel free to respond for further clarification,
    Thanks

    This is a duplicate of this How to put PageItems like textbox as placeholders in an image in a region?

  • Event handling betwwen two canvas classes

    Hi again!
    I have two canvas classes: MainCanvas and SubCanvas.
    SunCanvas has keyPressed() method implemented and it's working perfectlly. The only problem is when a certain key is pressed, say Select, I want MainCanvas to be notified.
    anybody have an idea?
    I tried with CommandListener but I can't work it out. Can i 'active' an event through Cammandlistener maybe?
    cheers
    Indy

    You have two choices here.
    The first is like you said using CommandListener. If you add a Command to your SubCanvas, and then set the MainCanvas as the CommandListener, then the MainCanvas gets notified if the command is selected through the commandAction() method:
    class SubCanvas extends Canvas {
      Command something = new Command("Hi",Command.OK,1);
      public SubCanvas(MainCanvas mc) {
        addCommand(something);
        setCommandListener(mc);
    class MainCanvas extends Canvas implements CommandListener {
      public void commandAction(Command c, Displayable d) {
    }The second option is to keep a reference to the MainCanvas instance in SubCanvas, and use this reference to call your own callback function:
    class SubCanvas extends Canvas {
      MainCanvas mc
      public SubCanvas(MainCanvas mc) {
        this.mc = mc
      void keyPressed(int keyCode) {
        if (keyCode == theKeyThatCallsMainCanvas) {
          mc.callbackFunction();
    class MainCanvas extends Canvas {
      public void callbackFunction() {
    }shmoove

  • Camera lens - sth like a part of a rainbow on my display ...

    i think that my "camera-lens" is damaged or sth ... every time i want to take a pic ... theres just sth like a rainbow on my display ... i thin that the lens is damaged - what to do now ... ... pls i need help ... there are only this ****** mcshark resellers here .... no apple stores :/

    That is one thing you could do, but no one else has any experience of exactly how your machine has been treated, and no one else can see the damage it has suffered. So all any of us can do is take guesses in the dark about what the damage actually is and what might have caused it -- which might be mildly interesting to someone, but certainly won't get the problem fixed. I recommend getting it fixed instead.

  • TS3694 hey everyone.. i have a problem with my 3Gs iphone.. i updated to the ios5 and now when i open it says that i have to connect it with the itunes. when i connect it says that has an error 28 something like that.. can anyone help me to fix it?? Regar

    hey everyone.. i have a problem with my 3Gs iphone.. i updated to the ios5 and now when i open it says that i have to connect it with the itunes. when i connect it says that has an error 28 something like that.. can anyone help me to fix it?? Regards

    Error 23, 28, 29: These errors may indicate a hardware issue with your device. Follow the steps in this article. Also attempt to restore while connected with the white USB Dock Connector cable that shipped with your device, on a known good computer and network to isolate this issue to the device. The MAC address being missing or the IMEI being the default value, (00 499901 064000 0), can also confirm a hardware issue. Out-of-date or incorrectly configured security software can also cause these errors.

  • Users of imovie experience a lot of problems and crying for help and no one at Apple did not respond I do not understand how a company like Apple puts experts to help users Please note that anonymous experts in Internet offer their help for money

    Users of imovie experience a lot of problems and crying for help and no one at Apple did not respond
    I do not understand how a company like Apple puts experts to help users
    Please note that anonymous experts in Internet offer their help for money

    Users of imovie experience a lot of problems and crying for help and no one at Apple did not respond
    I do not understand how a company like Apple puts experts to help users
    Please note that anonymous experts in Internet offer their help for money

  • Just bought an ipad mini I have synced it with my itunes but when I go to play my music it just flashes threw all the songs or albums or artists like it is on super fast shuffle until it finds a song it would like to play.  need help please

    Just bought an ipad mini I have synced it with my itunes but when I go to play my music it just flashes threw all the songs or albums or artists like it is on super fast shuffle until it finds a song it would like to play.  need help please

    Since you are a new iPad user .....
    Complete guide to using iOS 6
    http://howto.cnet.com/ios-6-complete-guide/
    Guide to Built-In Apps on iOS
    https://sites.google.com/site/appleclubfhs/support/advice-and-articles/guide-to- built-in-apps-ios
    You can download a complete iOS 5 iPad User Guide and iOS 6 iPad User Guide here: http://support.apple.com/manuals/ipad/
    Also, Good Instructions http://www.tcgeeks.com/how-to-use-ipad-2/
    Apple - iPad - Guided Tours
    http://www.apple.com/ipad/videos/
    Apple iPad Guided Tours - Watch the videos see all the amazing iPad apps in action. Learn how to use FaceTime, Mail, Safari, Videos, Maps, iBooks, App Store, and more.
    http://www.youtube.com/watch?v=YT2bD0-OqBM
    http://www.youtube.com/watch?v=ROY4tLyNlsg&feature=relmfu
    http://www.youtube.com/watch?v=QSPXXhmwYf4&feature=relmfu
    How to - Articles & User Guides & Tutorials
    http://www.iphone-mac.com/index.php/Index/howto/id/4/type/select
    iPad How-Tos  http://ipod.about.com/lr/ipad_how-tos/903396/1/
    You can download an iPad User Guide to the iPad from the iTunes store.
     Cheers, Tom

  • Hey My iphone just retored :( but before I downloaded 3 tones, but now I can' download it.. what should I do? ... I spende like 10 dollars... help please

    hey My iphone just retored but before I downloaded 3 tones, but now I can' download it.. what should I do? ... I spende like 10 dollars... help please

    If you can't redownload them go to expresslane.apple.com , Click iTunes > iTunes Store . On the next page choose Other iTunes Store Topics > How to Recover Missing Purchased Items, then on the next page, enter in your contact information, and iTunes Support will get back with you by email on how to redownload those Tones.
    Hope that helps.

  • Is there place in Aperture where a photo can be given  a different look, like a painted canvas, cartoon look, or other effects?

    Is there place in Aperture where a photo can be given  a different look, like a painted canvas, cartoon look, or other effects?

    Only by sending the photo to an external editor or using a plug-in, like Toonit (see ToonIt! For Aperture (Digital Anarchy)).
    The effects in Aperture (see the are very basic. Some simple effects Quartz Filter effects can be added by using Automator services, see my user tip here:
                     Using Quartz Filters with Aperture
    For example, using the ColorPencil effect:

  • When is showNotify() and hideNotify() methods of Canvas class called.

    Hi,
    I am porting SUN CLDC JVM.
    I needed to know when the JVM calls showNotify() and hideNotify() methods of Canvas class of MIDP?
    What events need to be sent to JVM for it to call the above methods?

    The JSR-118 says: "The change in visibility state of a Canvas may be caused by the application management software moving MIDlets between foreground and background states, or by the system obscuring the Canvas with system screens." This I'd understand that in case of showing list of commands overlaping part of the screen - then no - current screen is still active. In case there is completely different screen with list of commands - then yes - you display different screen.
    Rada

  • I follow all the instructions to change my "short" name, but when I log back in to my account, it's like starting over from scratch, help?

    I follow all the instructions to change my "short" name, but when I log back in to my account, it's like starting over from scratch, help?

    https://discussions.apple.com/message/6164451#6164451

  • After downloading and installing PS CC2014 i wanted start the application but got a message "Impossible d'initialiser Photoshop en raison d'une erreur du programme", in english sth like unable to initiate PS due to a programe error. I did an uninstall and

    After downloading and installing PS CC2014 i wanted start the application but got a message "Impossible d'initialiser Photoshop en raison d'une erreur du programme", in english sth like unable to initiate PS due to a programe error. I did an uninstall and a new download, but the problem's always there

    Try this: Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6

  • I have the Acrobat X Standard, the tool box no longer gives me the options I had before like splitting documents. Please help!

    I have the Acrobat X Standard, the tool box no longer gives me the options I had before like splitting documents. Please help!

    Was it AA X Std that you had these options in (sorry, I only have Pro)? If it was the trial (that is Pro), it may be that Std does not have to feature. Under XI at the Adobe site, there is a comparison of features between Std and Pro that might give you a hint.
    There is also an option to turn on or hide many tools. For me there is a small icon just above the tools...comment titles. If you select that it give a list of tools you can display. Often, several are not displayed by default. How you lost them is another things, but it is getting them that is the basic question.

  • Can Edge animation scale/resize like Flash and Canvas

    One of our biggest concern right now is animation made with Adobe Edge can't scale and resize like Flash or Canvas (and we are not talking about fluid or responsive design) Is that true? Our animations need to allow user zoom in or zoom out without any restrictions, can we build our animation with Adobe Edge?
    Thanks

    The best solution I've found is to override the width of your stage div in CSS to auto!important. Then, use media queries to resize your div, using the CSS zoom property (and scale transform for Firefox).
    /*  Example CSS for an Edge stage div of 800px width  */
    #MY-EDGE-STAGE-DIV{width:auto!important;max-width:800px;}
    @media screen and (min-width: 1px) and (max-width: 480px)
              #MY-EDGE-STAGE-DIV{zoom:0.5;-moz-transform: scale(0.5);}
    @media screen and (min-width: 481px) and (max-width: 600px)
              #MY-EDGE-STAGE-DIV{zoom:0.6;-moz-transform: scale(0.6);}
    @media screen and (min-width: 601px) and (max-width: 800px)
              #MY-EDGE-STAGE-DIV{zoom:0.8;-moz-transform: scale(0.8);}
    @media screen and (min-width: 801px) and (max-width: 50000px)
              #MY-EDGE-STAGE-DIV{zoom:1;-moz-transform: scale(1);}

Maybe you are looking for

  • On Mac. Colours changed after switching to 64bit mode (ver 2.7)

    Been using Lightroom 2.7 on my iMac quite happily and after reading a few articles realised it wasn't running in 64bit so changed it. Now colours are all out, most noticeable on reds: Before change After Change Any ideas why this is happening? Tried

  • ALV-Freeze colums and Icon on Selection Screen

    Dear All, suppose i have 10 columns in an ALV Report and i want to freeze from my 3rd column onwards so that if I scroll to right my these 3three columns can still be seen.How to do this. also how to display icon on selection screen.I remeber doing s

  • Dynamic proxy, several instances, same name, diff ids?

    I'm using a dynamic proxy with a simple invocation handler. Using the proxy for several instances of the target object should yield multiple instances of the proxy. In the debugger, each proxy instance is named $proxy0 with different ids. Can someone

  • How many material groups?

    The client i work for has more than 300 material groups? is this normal number of active material groups?

  • Exporting 2 file type/size simultaneously

    I'd love to be able to export both a full size tiff and web sized jpeg simultaneously.