GridPane class

Dear Friends,
I am new to JavaFX and I am trying to get started with netbeans and javafx. I have the latest netbeans 7.3 and javafx21 installed. But when I am trying to create the object
GridPane grid = new GridPane(); netbeans says cannot find the symbol. This is from the tutorial 2 Creating a Form in JavaFX in http://docs.oracle.com/javafx/2/get_started/form.htm
How can import this class? How can I solve the problem?
THank you

Thanks this seems to solve some of the problems, but still when I run it I get this
Compiling 1 source file to C:\Users\haris\Documents\NetBeansProjects\fxlogin\build\classes
C:\Users\haris\Documents\NetBeansProjects\fxlogin\src\fxlogin\Fxlogin.java:31: error: cannot find symbol
grid.setAlignment(Pos.CENTER);
symbol: variable Pos
location: class Fxlogin
C:\Users\haris\Documents\NetBeansProjects\fxlogin\src\fxlogin\Fxlogin.java:34: error: cannot find symbol
grid.setPadding(new Insets(25, 25, 25, 25));
symbol: class Insets
location: class Fxlogin
C:\Users\haris\Documents\NetBeansProjects\fxlogin\src\fxlogin\Fxlogin.java:36: error: cannot find symbol
Text scenetitle = new Text("Welcome");
symbol: class Text
location: class Fxlogin
C:\Users\haris\Documents\NetBeansProjects\fxlogin\src\fxlogin\Fxlogin.java:36: error: cannot find symbol
Text scenetitle = new Text("Welcome");
symbol: class Text
location: class Fxlogin
C:\Users\haris\Documents\NetBeansProjects\fxlogin\src\fxlogin\Fxlogin.java:37: error: cannot find symbol
scenetitle.setFont(Font.font("Tahoma", FontWeight.NORMAL, 20));
symbol: variable FontWeight
location: class Fxlogin
C:\Users\haris\Documents\NetBeansProjects\fxlogin\src\fxlogin\Fxlogin.java:37: error: cannot find symbol
scenetitle.setFont(Font.font("Tahoma", FontWeight.NORMAL, 20));
symbol: variable Font
location: class Fxlogin
C:\Users\haris\Documents\NetBeansProjects\fxlogin\src\fxlogin\Fxlogin.java:40: error: cannot find symbol
Label userName = new Label("User Name:");
symbol: class Label
location: class Fxlogin
C:\Users\haris\Documents\NetBeansProjects\fxlogin\src\fxlogin\Fxlogin.java:40: error: cannot find symbol
Label userName = new Label("User Name:");
symbol: class Label
location: class Fxlogin
C:\Users\haris\Documents\NetBeansProjects\fxlogin\src\fxlogin\Fxlogin.java:43: error: cannot find symbol
TextField userTextField = new TextField();
symbol: class TextField
location: class Fxlogin
C:\Users\haris\Documents\NetBeansProjects\fxlogin\src\fxlogin\Fxlogin.java:43: error: cannot find symbol
TextField userTextField = new TextField();
symbol: class TextField
location: class Fxlogin
C:\Users\haris\Documents\NetBeansProjects\fxlogin\src\fxlogin\Fxlogin.java:46: error: cannot find symbol
Label pw = new Label("Password:");
symbol: class Label
location: class Fxlogin
C:\Users\haris\Documents\NetBeansProjects\fxlogin\src\fxlogin\Fxlogin.java:46: error: cannot find symbol
Label pw = new Label("Password:");
symbol: class Label
location: class Fxlogin
C:\Users\haris\Documents\NetBeansProjects\fxlogin\src\fxlogin\Fxlogin.java:49: error: cannot find symbol
PasswordField pwBox = new PasswordField();
symbol: class PasswordField
location: class Fxlogin
C:\Users\haris\Documents\NetBeansProjects\fxlogin\src\fxlogin\Fxlogin.java:49: error: cannot find symbol
PasswordField pwBox = new PasswordField();
symbol: class PasswordField
location: class Fxlogin
14 errors
C:\Users\haris\Documents\NetBeansProjects\fxlogin\nbproject\build-impl.xml:960: The following error occurred while executing this line:
C:\Users\haris\Documents\NetBeansProjects\fxlogin\nbproject\build-impl.xml:297: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 6 seconds)

Similar Messages

  • Prolem with the hgrow constraint on a Column in a GridPane

    Hello,
    I am displaying the following controls in a GridPane.
    1. In row 1, a Label, a TextField, and a Button
    2. In row 2, A Label
    3. In row 3, a TextArea
    4. In row 4, a Label
    The complete program is at the end.
    Question #1:
    When I set the hgrow to ALWAYS for the first column through the statusBar Label control, the first column does not grow. Is it a bug or am I missing something in the JavaDoc to explain this behavior? When I set the hgrow constraint to ALWSY on nameLbl, it works.
    Question #2:
    Why is the nameLbl not getting enough width to display it completely?
    Thanks
    Kishori
    // GridPaneForm.java
    package test;
    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.Label;
    import javafx.scene.control.TextArea;
    import javafx.scene.control.TextField;
    import javafx.scene.layout.GridPane;
    import javafx.scene.layout.Priority;
    import javafx.stage.Stage;
    public class GridPaneForm extends Application {
         public static void main(String[] args) {
              Application.launch(args);
         public void start(Stage stage) {
              // A Label and a TextField
              Label nameLbl = new Label("Name:");
              TextField nameFld = new TextField();
              // A Label and a TextArea
              Label descLbl = new Label("Description:");     
              TextArea descText = new TextArea();
              descText.setPrefColumnCount(20);
              descText.setPrefRowCount(5);
              // Two buttons
              Button okBtn = new Button("OK");
              Button cancelBtn = new Button("Cancel");
              // A Label used as a status bar
              Label statusBar = new Label("Status: Ready");
              statusBar.setStyle("-fx-background-color: lavender;" +
                                 "-fx-font-size: 7pt;" +
                                 "-fx-padding: 10 0 0 0;");
              // Create a GridPane and set its background color to lightgray
              GridPane root = new GridPane();
              root.setStyle("-fx-background-color: lightgray;");
              // Add children to the GridPane
              root.add(nameLbl, 1, 1, 1, 1);   // (c1, r1, colspan=1, rowspan=1)
              root.add(nameFld, 2, 1, 1, 1);   // (c2, r1, colspan=1, rowspan=1)
              root.add(descLbl, 1, 2, 3, 1);   // (c1, r2, colspan=3, rowspan=1)
              root.add(descText, 1, 3, 2, 1);  // (c1, r3, colspan=2, rowspan=1)
              root.add(okBtn, 3, 1, 1, 1);     // (c3, r1, colspan=1, rowspan=1)
              root.add(cancelBtn, 3, 2, 1, 1); // (c3, r2, colspan=1, rowspan=1)
              root.add(statusBar, 1, 4, 3, 1); // (c1, r4, colspan=3, rowspan=1)
              /* Set constraints for children to customize their resizing behavior */
              // The max width of the OK button should be big enough,
              // so it can fill the width of its cell
              okBtn.setMaxWidth(Double.MAX_VALUE);
              // The name field in the first row should grow horizontally
              //GridPane.setHgrow(nameFld, Priority.ALWAYS);
              // The description field in the third row should grow vertically
              GridPane.setVgrow(descText, Priority.ALWAYS);
              // The status bar in the last should fill its cell
                    GridPane.setHgrow(statusBar, Priority.ALWAYS);
              statusBar.setMaxWidth(Double.MAX_VALUE);
              Scene scene = new Scene(root);
              stage.setScene(scene);
              stage.setTitle("Creating Forms Using a GridPane");
              stage.show();
    }

    Hello,
    I am displaying the following controls in a GridPane.
    1. In row 1, a Label, a TextField, and a Button
    2. In row 2, A Label
    3. In row 3, a TextArea
    4. In row 4, a Label
    The complete program is at the end.
    Question #1:
    When I set the hgrow to ALWAYS for the first column through the statusBar Label control, the first column does not grow. Is it a bug or am I missing something in the JavaDoc to explain this behavior? When I set the hgrow constraint to ALWSY on nameLbl, it works.
    Question #2:
    Why is the nameLbl not getting enough width to display it completely?
    Thanks
    Kishori
    // GridPaneForm.java
    package test;
    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.Label;
    import javafx.scene.control.TextArea;
    import javafx.scene.control.TextField;
    import javafx.scene.layout.GridPane;
    import javafx.scene.layout.Priority;
    import javafx.stage.Stage;
    public class GridPaneForm extends Application {
         public static void main(String[] args) {
              Application.launch(args);
         public void start(Stage stage) {
              // A Label and a TextField
              Label nameLbl = new Label("Name:");
              TextField nameFld = new TextField();
              // A Label and a TextArea
              Label descLbl = new Label("Description:");     
              TextArea descText = new TextArea();
              descText.setPrefColumnCount(20);
              descText.setPrefRowCount(5);
              // Two buttons
              Button okBtn = new Button("OK");
              Button cancelBtn = new Button("Cancel");
              // A Label used as a status bar
              Label statusBar = new Label("Status: Ready");
              statusBar.setStyle("-fx-background-color: lavender;" +
                                 "-fx-font-size: 7pt;" +
                                 "-fx-padding: 10 0 0 0;");
              // Create a GridPane and set its background color to lightgray
              GridPane root = new GridPane();
              root.setStyle("-fx-background-color: lightgray;");
              // Add children to the GridPane
              root.add(nameLbl, 1, 1, 1, 1);   // (c1, r1, colspan=1, rowspan=1)
              root.add(nameFld, 2, 1, 1, 1);   // (c2, r1, colspan=1, rowspan=1)
              root.add(descLbl, 1, 2, 3, 1);   // (c1, r2, colspan=3, rowspan=1)
              root.add(descText, 1, 3, 2, 1);  // (c1, r3, colspan=2, rowspan=1)
              root.add(okBtn, 3, 1, 1, 1);     // (c3, r1, colspan=1, rowspan=1)
              root.add(cancelBtn, 3, 2, 1, 1); // (c3, r2, colspan=1, rowspan=1)
              root.add(statusBar, 1, 4, 3, 1); // (c1, r4, colspan=3, rowspan=1)
              /* Set constraints for children to customize their resizing behavior */
              // The max width of the OK button should be big enough,
              // so it can fill the width of its cell
              okBtn.setMaxWidth(Double.MAX_VALUE);
              // The name field in the first row should grow horizontally
              //GridPane.setHgrow(nameFld, Priority.ALWAYS);
              // The description field in the third row should grow vertically
              GridPane.setVgrow(descText, Priority.ALWAYS);
              // The status bar in the last should fill its cell
                    GridPane.setHgrow(statusBar, Priority.ALWAYS);
              statusBar.setMaxWidth(Double.MAX_VALUE);
              Scene scene = new Scene(root);
              stage.setScene(scene);
              stage.setTitle("Creating Forms Using a GridPane");
              stage.show();
    }

  • Strange behavior with Label#setWrapText(true) in GridPane.

    I've got a strange behavior with a Label, which has setWrapText(true) in a GridPane.
    Check out the sample and click the button.
    You see, that the GridPane suddenly behaves as if it had GridPane.setVGrow and HGrow set for the lblStatus.
    (it takes the full available space).
    Furthermore the first column shrinks to a minimum, so that lblText1 can't display its text anymore.
    Tested with 2.1 GA.
    Any help with that?
    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.geometry.Insets;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.Label;
    import javafx.scene.layout.GridPane;
    import javafx.stage.Stage;
    public class TestApp4 extends Application {
        public static void main(String[] args) {
            launch(args);
        @Override
        public void start(final Stage stage) throws Exception {
            GridPane gridPane = new GridPane();
            gridPane.setPadding(new Insets(2, 2, 2, 2));
            Label lblText1 = new Label();
            lblText1.textProperty().set("Some text");
            Label lblText2 = new Label();
            lblText2.textProperty().set("Some other text");
            Button btnClick = new Button();
            btnClick.textProperty().set("Click me");
            final Label lblStatus = new Label();
            lblStatus.setWrapText(true);
            gridPane.add(lblText1, 0, 0, 1, 1);
            gridPane.add(lblText2, 1, 0);
            gridPane.add(lblStatus, 0, 2, 2, 1);
            gridPane.add(btnClick, 0, 3, 2, 1);
            btnClick.setOnAction(new EventHandler<ActionEvent>() {
                @Override
                public void handle(ActionEvent actionEvent) {
                    lblStatus.setText("very long text, very long text, very long text, very long text,very long text, very long text");
            gridPane.setGridLinesVisible(true);
            Scene scene = new Scene(gridPane, 300, 300);
            stage.setScene(scene);
            stage.show();
    }Edited by: csh on 19.07.2012 03:35

    It seems the Label doesn't like it, that it is in a GridCell with rowspan = 2
    If it is in a normal cell (no rowspan), it works.
    If I add ColumnConstraints to the gridpane, it kind of works, but the Label still occupies more space than it should.
    Edited by: csh on 19.07.2012 03:51

  • How to set column width in GridPane in FXML?

    I would like to set width, for ex, of column 4 in GridPane.
    I can do like this:
    <columnConstraints>
                <ColumnConstraints prefWidth="100"/>
                <ColumnConstraints prefWidth="200" />
                <ColumnConstraints prefWidth="200" />
                <ColumnConstraints prefWidth="200" />
    </columnConstraints>If i have 10 columns should i add 10 column constraints? (i need to set only width of 4th column)
    How can i do it easier?

    >
    Hi, Can someone please help on how to set the columnwidth in csv file using javacode.
    I used FileWriter class to upload data into the csv file but csv file is taking default width while showing content. Is there a way to set the fixed column width or set width dinamically based on value?
    >
    The fields in CSV (Comma-Separated-Value) files are separated by commas; they do not have a fixed width.

  • Issue with a class extending EventHandler MouseEvent

    Hello all,
    I originally had a nested class that was a used for mouseEvents. I wanted to make this it's own class, so I can call it directly into other class objects I have made, but for some reason it isn't working and I'm getting an eror
    here is the code:
    public class MouseHandler implements EventHandler<MouseEvent>
        private double sceneAnchorX;
        private double sceneAnchorY;
        private double anchorAngle;
        private Parent parent;
        private final Node nodeToMove ;
       MouseHandler(Node nodeToMove)
           this.nodeToMove = nodeToMove ;
        @Override
        public void handle(MouseEvent event)
          if (event.getEventType() == MouseEvent.MOUSE_PRESSED)
            sceneAnchorX = event.getSceneX();
            sceneAnchorY = event.getSceneY();
            anchorAngle = nodeToMove.getRotate();
            event.consume();
          else if (event.getEventType() == MouseEvent.MOUSE_DRAGGED)
              if(event.isControlDown())
                  nodeToMove.setRotationAxis(new Point3D(sceneAnchorY,event.getSceneX(),0));
                  nodeToMove.setRotate(anchorAngle + sceneAnchorX -  event.getSceneX());
                  sceneAnchorX = event.getSceneX();
                  sceneAnchorY = event.getSceneY();
                  anchorAngle = nodeToMove.getRotate();
                  event.consume();
              else
                double x = event.getSceneX();
                double y = event.getSceneY();
                nodeToMove.setTranslateX(nodeToMove.getTranslateX() + x - sceneAnchorX);
                nodeToMove.setTranslateY(nodeToMove.getTranslateY() + y - sceneAnchorY);
                sceneAnchorX = x;
                sceneAnchorY = y;
                event.consume();
          else if(event.getEventType() == MouseEvent.MOUSE_CLICKED)
            //  nodeToMove.setFocusTraversable(true);
               nodeToMove.requestFocus();
               event.consume();
                         nodeToMove.setOnKeyPressed((KeyEvent)
    ->{
         if(KeyCode.UP.equals(KeyEvent.getCode()))
             nodeToMove.setScaleX(nodeToMove.getScaleX()+ .1);
             nodeToMove.setScaleY(nodeToMove.getScaleY()+ .1);
             nodeToMove.setScaleZ(nodeToMove.getScaleZ()+ .1);
             System.out.println("kaw");
             KeyEvent.consume();
         if(KeyCode.DOWN.equals(KeyEvent.getCode()))
             if(nodeToMove.getScaleX() > 0.15)
             nodeToMove.setScaleX(nodeToMove.getScaleX()- .1);
             nodeToMove.setScaleY(nodeToMove.getScaleY()- .1);
             nodeToMove.setScaleZ(nodeToMove.getScaleZ()- .1);
             System.out.println(nodeToMove.getScaleX());
             KeyEvent.consume();
         nodeToMove.setOnScroll((ScrollEvent)
                 ->{
             if(nodeToMove.isFocused())
                        if(ScrollEvent.getDeltaY() > 0)
                            nodeToMove.setTranslateZ(10+nodeToMove.getTranslateZ());
                        else
                            nodeToMove.setTranslateZ(-10+nodeToMove.getTranslateZ());
           ScrollEvent.consume();
    }This is the class where I call it.
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.Pane;
    import javafx.scene.paint.Color;
    import javafx.scene.paint.PhongMaterial;
    import javafx.scene.shape.Box;
    * @author Konrad
    public class Display extends Pane
        Box b;
        PhongMaterial pm = new PhongMaterial(Color.GRAY);
        public Display(Double x, Double y,Double width, Double height)
             super();
             b = new Box(width, height,10);
             setPrefSize(width,height);
             relocate(x, y);
             b.setMaterial(pm); 
             b.addEventFilter(MouseEvent.ANY, new MouseHandler(this));
             getChildren().add(b);
    }There is no red dot stating the class doesn't exist, or anything is wrong, but when I run it I get an error.
    here is the error:
    C:\Users\Konrad\Documents\NetBeansProjects\3D\src\3d\Display.java:29: error: cannot find symbol
             b.addEventFilter(MouseEvent.ANY, new MouseHandler(this));
      symbol:   class MouseHandler
      location: class DisplayThis is another class from the one that it was originally "nested" in(sorry if I'm not using correct terms). The other class, as well as this, produce the same error(this one was just smaller and eaiser to use as an example).
    The code is exactly the same.
    Originally I thought that the MouseEvent class wasn't an FX class, so I switched it and thought it worked, tried it on the Display class it didn't, tried it on the first one and yeah still didn't, so not too sure what happened there :(.
    Thanks,
    ~KZ
    Edited by: KonradZuse on Jun 7, 2013 12:15 PM
    Edited by: KonradZuse on Jun 7, 2013 12:38 PM
    Edited by: KonradZuse on Jun 7, 2013 12:39 PM

    Last time that was the issue I was having for a certain case; however this seems to be different, here is the list of imports for each class.
    MouseHandler:
    import javafx.event.EventHandler;
    import javafx.geometry.Point3D;
    import javafx.scene.Node;
    import javafx.scene.Parent;
    import javafx.scene.input.KeyCode;
    import javafx.scene.input.MouseEvent;Display:
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.Pane;
    import javafx.scene.paint.Color;
    import javafx.scene.paint.PhongMaterial;
    import javafx.scene.shape.Box;draw:
    import java.io.File;
    import java.sql.*;
    import javafx.application.Application;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.event.ActionEvent;
    import javafx.geometry.Rectangle2D;
    import javafx.scene.Group;
    import javafx.scene.PerspectiveCamera;
    import javafx.scene.PointLight;
    import javafx.scene.Scene;
    import javafx.scene.control.Label;
    import javafx.scene.control.ListCell;
    import javafx.scene.control.ListView;
    import javafx.scene.control.Menu;
    import javafx.scene.control.MenuBar;
    import javafx.scene.control.MenuItem;
    import javafx.scene.control.TextField;
    import javafx.scene.input.ClipboardContent;
    import javafx.scene.input.DataFormat;
    import javafx.scene.input.DragEvent;
    import javafx.scene.input.Dragboard;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.input.TransferMode;
    import javafx.scene.layout.GridPane;
    import javafx.scene.layout.Pane;
    import javafx.scene.paint.Color;
    import javafx.scene.paint.PhongMaterial;
    import javafx.scene.shape.TriangleMesh;
    import javafx.stage.FileChooser;
    import javafx.stage.FileChooser.ExtensionFilter;
    import javafx.stage.Screen;
    import javafx.stage.Stage;
    import javafx.stage.StageStyle;
    import jfxtras.labs.scene.control.window.Window;
    import org.controlsfx.dialogs.Action;
    import org.controlsfx.dialogs.Dialog;Edited by: KonradZuse on Jun 7, 2013 2:27 PM
    Oddly enough I tried it again and it worked once, but the second time it error-ed out again, so I'm not sure what the deal is.
    then I ended up getting it to work again in the draw class only but when I tried to use the event I get this error.
    J a v a M e s s a g e : 3 d / M o u s e H a n d l e r
    java.lang.NoClassDefFoundError: 3d/MouseHandler
         at shelflogic3d.draw.lambda$5(draw.java:331)
         at shelflogic3d.draw$$Lambda$16.handle(Unknown Source)
         at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
         at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
         at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
         at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
         at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
         at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
         at javafx.event.Event.fireEvent(Event.java:202)
         at javafx.scene.Scene$DnDGesture.fireEvent(Scene.java:2824)
         at javafx.scene.Scene$DnDGesture.processTargetDrop(Scene.java:3028)
         at javafx.scene.Scene$DnDGesture.access$6500(Scene.java:2800)
         at javafx.scene.Scene$DropTargetListener.drop(Scene.java:2771)
         at com.sun.javafx.tk.quantum.GlassSceneDnDEventHandler$3.run(GlassSceneDnDEventHandler.java:85)
         at com.sun.javafx.tk.quantum.GlassSceneDnDEventHandler$3.run(GlassSceneDnDEventHandler.java:81)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.javafx.tk.quantum.GlassSceneDnDEventHandler.handleDragDrop(GlassSceneDnDEventHandler.java:81)
         at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleDragDrop(GlassViewEventHandler.java:595)
         at com.sun.glass.ui.View.handleDragDrop(View.java:664)
         at com.sun.glass.ui.View.notifyDragDrop(View.java:977)
         at com.sun.glass.ui.win.WinDnDClipboard.push(Native Method)
         at com.sun.glass.ui.win.WinSystemClipboard.pushToSystem(WinSystemClipboard.java:234)
         at com.sun.glass.ui.SystemClipboard.flush(SystemClipboard.java:51)
         at com.sun.glass.ui.ClipboardAssistance.flush(ClipboardAssistance.java:59)
         at com.sun.javafx.tk.quantum.QuantumClipboard.flush(QuantumClipboard.java:260)
         at com.sun.javafx.tk.quantum.QuantumToolkit.startDrag(QuantumToolkit.java:1277)
         at javafx.scene.Scene$DnDGesture.dragDetectedProcessed(Scene.java:2844)
         at javafx.scene.Scene$DnDGesture.process(Scene.java:2905)
         at javafx.scene.Scene$DnDGesture.access$8500(Scene.java:2800)
         at javafx.scene.Scene$MouseHandler.process(Scene.java:3564)
         at javafx.scene.Scene$MouseHandler.process(Scene.java:3379)
         at javafx.scene.Scene$MouseHandler.access$1800(Scene.java:3331)
         at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1612)
         at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2399)
         at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:312)
         at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:237)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:354)
         at com.sun.glass.ui.View.handleMouseEvent(View.java:514)
         at com.sun.glass.ui.View.notifyMouse(View.java:877)
         at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
         at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)
         at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:101)
         at java.lang.Thread.run(Thread.java:724)
    Caused by: java.lang.ClassNotFoundException: shelflogic3d.MouseHandler
         at java.net.URLClassLoader$1.run(URLClassLoader.java:365)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:354)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:353)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
         ... 50 more
    Exception in thread "JavaFX Application Thread" E..........After the E comes a bunch of random stuff with drag and drop and such (since I'm dragging an item, and then creating it and giving it the event in question).
    Line 331 is                      b.addEventHandler(MouseEvent.ANY, new MouseHandler(b));

  • Get Children of a GridPane and Make them bold

    Hello,
    i want to set the Children of a Gridpane bold. The Childrens types are text.
    private GridPane labelPane = new GridPane();
            final Text text  = new Text();
            final Text text1 = new Text();
            final Text text2 = new Text();
            final Text text3 = new Text();
       labelPane.getChildren().addAll(text, text1, text2, text3);So basically im searching for something like this:
    labelPane.getChildren().setFont(Weight.BOLD);Does java somehow recognize, that the childrens are from type text, so we can set them bold?
    Because ...
    Text test2 ) = new Text();
    text2.setFont(...)... wouldn't be a problem. Do i have to choose another way?
    Thank you,
    regards

    This is something you would define using CSS - and then assign the respective style class using getStyleClass().add(styleClassName) either on each individual text node or on the grid pane.
    In the lattercase CSS might look like this then (didn't check, might not work):
    .boldchildren-gridpane .text {
      -fx-font-weight:bold;
    }Edited by: Andipa on 06.11.2012 03:32

  • Can't update GridPane from Button Action

    I'm making a simple gui for Conway's Game of Life with a grid (GridPane) and a simple toolbar with Start/Stop buttons. My start button action looks like this:
    startButton.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent actionEvent) {
                grid.change();
        });So when i click it the grid updates ones as i expect. But i when i add something like a Service/Platform.runLater/Runnable inside it evaluates generations, grid model, but refuses to update the grid view. My Service code looks like this:
    private Service task = new Service(){
        @Override
        protected Task createTask() {
            System.out.println("Task created");
            return new Task<Void>() {
                @Override
                protected Void call() throws Exception {
                    for (int i = 0; i < 3; i++) {
                        System.out.println("calling");
                        Platform.runLater(new Runnable(){
                            @Override
                            public void run() {
                                System.out.println("running");
                               grid.changeGeneration();
                                try {
                                    Thread.sleep(1500L);
                                } catch (InterruptedException e) {
                                    e.printStackTrace(); 
                    return null;
    };It prints Task created calling calling calling running running running to the console, but doesn't update the GridPane after each running, only after everything is done it updates it (in this case after the third "running"). Where am i making a mistake and how to fix this. I don't want to use Swing =)
    Same question on [http://stackoverflow.com/questions/13820734/cant-update-gridpane]
    Edited by: Riddle on 11.12.2012 7:21

    public void changeGeneration() {
            Cell[][] newGen = new Cell[rows][cols];
            Cell cell;
            for (int i = 0; i < newGen.length; i++) {
                for (int j = 0; j < newGen.length; j++) {
    cell = new Cell(destiny(cells, i, j));
    newGen[i][j] = cell;
    add(cell, i, j);
    curGen = newGen;
    My grid class is a subclass of GridPane
    So when i click button it's working, but not from other Runnable
    Edited by: Riddle on 11.12.2012 9:11                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How do i open a web page with VeriSign Class 3 Extended Validation SSL SGC SS CA certfificate i can't open web pages with this, how do i open a web page with VeriSign Class 3 Extended Validation SSL SGC CA certfificate i can't open web pages with this

    how do i open a web page with VeriSign Class 3 Extended Validation SSL SGC SS CA ?

    Hi
    I am not suprised no one answered your questions, there are simply to many of them. Can I suggest you read the faq on 'how to get help quickly at - http://forums.adobe.com/thread/470404.
    Especially the section Don't which says -
    DON'T
    Don't post a series of questions in  a single post. Splitting them into separate threads increases your  chances of a quick answer.
    PZ
    www.pziecina.com

  • Previewing an image before uploading it using the FileReference class

    Previewing an image before uploading it using the FileReference class in flash player 3 not in SDK4

    Previewing an image before uploading it using the FileReference class in flash player 3 not in SDK4

  • Previewing an image before uploading it using the FileReference class in flex 3

    Previewing an image before uploading it using the FileReference class in flex 3 ?

    hai,
              when this code is used in my application ,i got the name of image and new frame is added each time .But image is not displayed.....
    The code  starts like this
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
                xmlns:mx="library://ns.adobe.com/flex/mx" initialize="init()"   backgroundColor="white" width="100%" height="100%">
        <fx:Script>
    <![CDATA[ 
                    import mx.controls.Alert;
                    import mx.messaging.Channel;
                    import mx.messaging.ChannelSet;
                    import mx.messaging.channels.AMFChannel;
                    import mx.rpc.events.ResultEvent;
                    import mx.controls.Image;
                    import spark.events.IndexChangeEvent;
                    import mx.managers.DragManager;
      <mx:DataGridColumn headerText="Dimension Value"  width="10" dataField="dimensionValue"/>
                                                   <mx:DataGridColumn headerText="Unit Nmae"  width="10" dataField="dimensionUnitName"/>
                                                   </mx:columns>
                                           </mx:DataGrid>
                                           <mx:Spacer width="2%"/>
                                       </mx:HDividedBox>
                                       </mx:VBox>
                   <mx:Spacer height="0"/>
                <mx:VBox width="100%">
                    <s:HGroup height="90" top="0" left="0" right="0" verticalAlign="justify" gap="10" paddingLeft="5" paddingRight="5" paddingTop="5" paddingBottom="5">
                        <s:Button id="btn_loader" top="5" bottom="24" width="100" label="load" click="loadImages()"/>
                        <s:Group width="100%">
                            <s:Group name="cl" top="0" left="0" bottom="0" width="20" mouseOver="//scroll_on(event)" mouseOut="//scroll_off(event)">
                                <s:BitmapImage source="@Embed('../assets/left.jpg')" top="0" left="0" bottom="0" right="0" fillMode="scale"/>   
                            </s:Group>
                            <s:List id="imgList" skinClass="skins.ListSkin" top="-3" left="27" right="28" bottom="10"
                                    dataProvider="{ImageCollection}" itemRenderer="Image_Render">
                                <s:layout>
                                    <s:HorizontalLayout gap="0"/>
                                </s:layout>
                            </s:List>
                            <s:Group name="cr" top="0" right="0" bottom="0" width="20" mouseOver="//scroll_on(event)" mouseOut="//scroll_off(event)">
                                <s:BitmapImage source="@Embed('../assets/right.jpg')" top="-1" left="0" bottom="0" right="0" fillMode="scale"/>
                            </s:Group>
                        </s:Group>
                    </s:HGroup>
                    <s:SkinnableContainer id="dropCanvas" top="100" left="5" right="5" bottom="5" backgroundAlpha="1.0" alpha="1.0"
                                          dragEnter="dropCanvas_dragEnterHandler(event)"
                                          dragDrop="dropCanvas_dragDropHandler(event)" contentBackgroundColor="#914E4E" backgroundColor="#F7F7F7">
                    </s:SkinnableContainer>
                </mx:VBox>
                <mx:Spacer height="5"/>
                                      </mx:VDividedBox>
        </mx:Panel>
    </mx:Canvas>

  • Get the values from the bean class?

    Hi Praveen and all can u please suggest in this,
    I have developped an application In that Create One java class that Extends PageProcesscomponenet and utilizing the Bean That have the Connetion method and retriving the query Based on the Logon customer and spoof customer.
    this functionality I have developped in Pageprocessor component.
    The same functinality I am utilizing another java Class that Extends AbstractPortalcomponent  and utilizing the same Bean.
    But the problem both java classes for I used one Jsp only Dynmic spoof customer will come from the JSP Input filed.
    In the new Java Class How can I capture the Event When I click the Buttong the InputField value capturing into the AbstractPortalcomponent Class.
    I tried like this but It comes as Null Value.
    Event event = myContext.getCurrentEvent();
                              if(event!=null)
                                  InputField ip= (InputField) myContext.getComponentForId("spoofCust");
                                  String spoofCust=ip.getValue().toString();
    Please suggest me in this.
    What is wrong with this.
    Thanks,
    Lohi.
    Message was edited by:
            Lohitha M

    Lohitha,
    Try replacing your two lines of code:
    InputField ip= (InputField) myContext.getComponentForId("spoofCust");
    String spoofCust=ip.getValue().toString();
    with:
    InputField ip = (InputField) getComponentByName("spoofCust");     
    String spoofCust = ip.getValueAsDataType().toString();
    Let me know how that works for you.
    -John

  • Get the values from Exception class

    Hi all ..
    In class i have raised one exception
    when i catch this exception in my program i m able to get the
    error message but i need to get all the parameters that i pass
    when i raise the exception ...
    i have raised like this
          RAISE EXCEPTION TYPE cx_bapi_error
            EXPORTING
              textid = cx_bapi_error=>cx_bo_error
              class_name = 'ZHS_'
              log_no = wa_bapi_return-log_no
              log_msg_no = wa_bapi_return-log_msg_no
              t100_msgid = wa_bapi_return-id
              t100_msgno = wa_bapi_return-number
              t100_msgv1 = wa_bapi_return-message_v1
              t100_msgv2 = wa_bapi_return-message_v2
              t100_msgv3 = wa_bapi_return-message_v3
              t100_msgv4 = wa_bapi_return-message_v4
              STATUS = lt_status
    and caught the exception like this in my program
        CATCH cx_bapi_error INTO go_error.
          gd_text = go_error->get_text( ).
          EXIT.
      ENDTRY.
    in this i m just getting the class name which i have passed in exception
    i need all other parameters that i have passed ..
    if u have any idea pls let me know ..
    Thanks in advance ...

    Hello Jayakumar
    Usually the attributes of standard exception classes are defines as <b>public</b> and <b>read-only</b>. Thus, you should be able to use the following coding:
    DATA:
      go_error   TYPE REF TO cx_bapi_error.  " specific exception class !!!
    TRY.
    RAISE EXCEPTION TYPE cx_bapi_error
    EXPORTING
    textid = cx_bapi_error=>cx_bo_error
    class_name = 'ZHS_'
    log_no = wa_bapi_return-log_no
    log_msg_no = wa_bapi_return-log_msg_no
    t100_msgid = wa_bapi_return-id
    t100_msgno = wa_bapi_return-number
    t100_msgv1 = wa_bapi_return-message_v1
    t100_msgv2 = wa_bapi_return-message_v2
    t100_msgv3 = wa_bapi_return-message_v3
    t100_msgv4 = wa_bapi_return-message_v4
    STATUS = lt_status.
    CATCH cx_bapi_error INTO go_error.
    gd_text = go_error->get_text( ).
    WRITE: go_error->t100_msgid,  " perhaps the attributes have different name
                go_error->t100_msgno, " check attribute names in SE24
    EXIT.
    ENDTRY.
    Regards
      Uwe

  • Problem with setContentPane() in JFrame class

    I recently discovered a problem with the setContentPane method in the JFrame class. When I use setContentPane(Container ..), the previously existing contentPane remains in the stack. I have tried nullifying getContentPane(), and all manner of things, but, each time I use setContentPane, I have another instance of a JPanel in the stack.
    I'm using code similar to setContentPane(new CustomJPanel()); and each time the user changes screens, and a similar call to that is made, the old CustomJPanel instance remains in the stack. Can anyone suggest a way around this? On their own the panels do not take up very much memory, but after several hours of usage, they will build up.

    I tried what you suggested; it only resulted in a huge performance decrease. The problem with memory allocation is still there.
    Here is the method I use to switch screens in my app:
    public static void changeScreen (JPanel panel){
              try{
                   appFrame.setTitle("Wordinary : \""+getTitle()+"\"");
                   appFrame.setContentPane(panel);
                   appFrame.setSize(appFrame.getContentPane().getPreferredSize());     
                   appFrame.getContentPane().setBackground(backColour);
                   for (int i = 0; i < appFrame.getContentPane().getComponents().length; i++)
                        appFrame.getContentPane().getComponents().setForeground(textColour);
                   //System.out.println("Background colour set to "+backColour+" text colour set to "+textColour);
                   appFrame.validate();
              catch (Exception e){
                   //System.out.println("change");
                   e.printStackTrace();
    And it is called like this:
    changeScreen(new AddWordPanel());The instantiation of the new instance is what is causing the memory problems, but I can't think of a way around it.

  • Problem with Outer and Inner Classes....or better way?

    Right now I'm trying to create an Inner class.
    My .java file compiles ok, and I create my jar file too.
    But when I try to instantiate the Inner class, it fails:
    java.lang.NoClassDefFoundError: com/myco/vlXML/vlXML$vlDocument.
    Here's the class code:
    public class vlXML{
        private ArrayList myDocList=new ArrayList(); //holds documents
        public vlXML(){
        private class vlDocument{
            public vlDocument(){
            //stuff goes here
        public vlDocument vlDOC(){
            return new vlDocument();
        public void addDocument(){
            vlXML xxx=new vlXML();
            vlDocument myDoc=xxx.vlDOC();
            myDocList.add(myDoc);
        public int getNumDocs(){
            return myDocList.size();
    }Then, from a jsp page, I call:
    vlXML junk1=new vlXML();
    junk1.addDocument();...and get the error...
    Can someone help me figure out why it's failing?
    Thanks....

    You nailed it - thanks....(duh!)
    While I have your attention, if you don't mind, I have another question.
    I'm creating a Class (outer) that allows my users to write a specific XML file (according to my own schema).
    Within the XML file, they can have multiple instances of certain tags, like "Document". "Document"s can have multiple fields.
    Since I don't know how many "Documents" they may want, I was planning on using an Inner Class of "Document", and then simply letting them "add" as many as necessary (thus the original code posted here).
    Does that seem like an efficient (logical/reasonable) methodology,
    or is there there something better?
    Thanks Again...

  • JBO:33001 bc4j.xcfg file not found in class path

    Hi,
    I am yet another victim of the age-old error JBO:33001 bc4j.xcfg file not found in class path, When i have my BC4JApp.jar in Tomcat Web-inf/lib directory. All the other jar files and class files in my webserver-application web-inf classes and lib directory works.
    But Tomcat server is not able to read this bc4j.xcfg file. I can see in my jar file that this bc4j.xcfg exists and in the specified package directory. still the problem persists. My BC4JApp.jar is perfectly working when i use JDeveloper. but not when i use tomcat4.0 and call a JSP using BC4JApp.jar from browser (My environment is Jdeveloper3.2, Tomcat4.0+IIS in middle tier and oracle 8i as DB, everything on windows2k)
    I have gone through almost all the threads possible that relates to this error in this form. None of them have a answer except to say "put the file in classpath". and last reply is "will fix in jDeveloper 9i. So what happens to us who are working in Jdeveloper 3.2?
    1. I have this file in my jar file.
    2. I also tried creating a seperate directory manually, with the same name as my package under web-inf/classes, web-inf/lib , just under web-inf directory and atlast under approot directory also. I tried having my package directory containing bc4j.xcfg in these folders one at a time and also tried having this directory in all these folders at the same time.
    Still no solution.
    Itz frustrating that neither proper documentation nor a right url page nor i am aware of available addressing this. page links given in above threads only gives me the wonderful page of ie's "Page cannot be displayed".
    Is there a answer to this error and my problem. If this doesn't work, then i have to all the way develop from scratch creating my jsp using JDBC calls and Stored packages etc.
    I don't want to give up on this Jdeveloper at this final moment because if this bc4j.xcfg file is found, my application will work perfectly. on these final moments, if this doesn't work, i am frightened to imagine to develop my application in standard way. Atlast, if thatz the option left,we have to do that bcos our production date is close by.
    Please can some one in this forum or Jdeveloper help me to solve this problem. I am desperate and very urgent.
    Waiting for a reply from Jdev team very much...
    ( I just posted in the other thread which is pretty old, dated backto May 2001, which was relevant to this error. Just to make sure it is noticed, I am posting it seperately too)
    Thanks
    Hari(2/3/02)

    Hi All,
    For those who are following this thread, I got a solution for this error with the help of Jdev Team.
    This solution may work, if you have deployed your application in Tomcat4.0.1. This is the environment in which I work and tested.
    As you may be aware, Tomcat ignores value in CLASSPATH variable.
    To see any files that are existing or newly deployed, it has it own way of detecting it.
    Addition information on Tomcat working, you can follow this link,
    http://jakarta.apache.org/tomcat/tomcat-4.0-doc/index.html
    Coming to point, Tomcat has got five classloaders and each classloader invoked, looks in their related directories for files in following order.
    1. /WEB-INF/classes of your web-application
    2. /WEB-INF/lib/*.jar of your web application
    3. BootStrap classes of your JVM (Tomcat's $JAVA_HOME/jre/lib/ext)
    4. System class loader classes($CATALINA_HOME/bin/bootstrap.jar,CATALINA_HOME/lib/tools.jar)
    5. $CATALINA_HOME/common/classes
    6. $CATALINA_HOME/common/lib/*.jar
    7. $CATALINA_HOME//classes
    8. $CATALINA_HOME/lib/*.jar
    So All your individual application related files should be deployed in your application's WEB-INF/classes or WEB-INF/lib directory accordingly.
    If your application files are unpacked, they should be deployed or copied under WEB-INF/classes directory
    if the files are within a jar, they should be under WEB-INF/lib directory.
    If your Jar-files contains bc4j components, then those jar files should be deployed under WEB-INF/lib directory. Also,do the next step to copy all relavant BC4J runtime libraries under lib directory.
    IMPORTANT: Please remember to copy and paste all the required BC4j runtime libraries in the Same WEB-INF/lib directory along with your application jar files. This is the real reason which can solve this JBO:33001 to disappear. It worked for me.
    To configure your directory for tag-lib uri's, use web.xml to set the taglib-uri attribute.
    Put your web.xml and DataTags.tld in the WEB-INF directory.
    Your simple web.xml may look like as follows.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
         <taglib>
              <taglib-uri>
                   /webapp/DataTags.tld
              </taglib-uri>
              <taglib-location>
                   /WEB-INF/DataTags.tld
              </taglib-location>
         </taglib>
    </web-app>
    You may then modify this web.xml to suit further requirements of your application.
    Remember to stop and restart the Tomcat Server (service) by using shutdown and startup scripts after updating any jar files/class files/ JSP or source files deployed in Tomcat.
    Sometimes, only this helps even though your context's reloadable attribute is set to true in Tomcat Server's server.xml file.
    Hope this above information helps you to solve this error in Tomcat environment. My Sincere thanks once again to Juan and Jdev team for their help and efforts to solve this problem.
    Thanks
    Hari

Maybe you are looking for