Giter VIP home page Giter VIP logo

javafxdialog's People

Contributors

4ntoine avatar denisoliveira avatar gaetancollaud avatar idrabenia avatar urskr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

javafxdialog's Issues

an error

Hi I'm very sorry to bother you, I'm a flesh in using javafx:

I have problem when using your code, Could you please help me ?

Here is the results:
Exception in thread "JavaFX Application Thread" java.util.MissingResourceException: Can't find bundle for base name dialog, locale zh_CN

And here is the java source code:

package testDialog;

import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
import name.antonsmirnov.javafx.dialog.Dialog;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;

public class HandleEvent extends Application {
@OverRide // Override the start method in the Application class
public void start(Stage primaryStage) {
// Create a pane and set its properties
HBox pane = new HBox(10);
pane.setAlignment(Pos.CENTER);
Button btOK = new Button("OK");
Button btCancel = new Button("Cancel");
OKHandlerClass handler1 = new OKHandlerClass();
btOK.setOnAction(handler1);
CancelHandlerClass handler2 = new CancelHandlerClass();
btCancel.setOnAction(handler2);
pane.getChildren().addAll(btOK, btCancel);

// Create a scene and place it in the stage
Scene scene = new Scene(pane, 300 ,100);
primaryStage.setTitle("HandleEvent"); // Set the stage title
primaryStage.setScene(scene); // Place the scene in the stage
primaryStage.show(); // Display the stage

}

/**

  • The main method is only needed for the IDE with limited
  • JavaFX support. Not needed for running from the command line.
    */
    public static void main(String[] args) {
    launch(args);
    }
    }

class OKHandlerClass implements EventHandler {
@OverRide
public void handle(ActionEvent e) {
System.out.println("OK button clicked");
Dialog.showInfo("No","just a test!");
//Dialog.showError("No","just a test!");
}
}

class CancelHandlerClass implements EventHandler {
@OverRide
public void handle(ActionEvent e) {
System.out.println("Cancel button clicked");
}
}

Internationalization?

Hey @4ntoine,
have you considered adding internationalization-files to the dialogs so we can see the button labels in our own language?
If you provide the framework, others could easily add the various translations.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.