Examples of JXLoginPane


Examples of org.jdesktop.swingx.JXLoginPane

        bind();
    }

    private void createLoginPaneDemo() {
        service = new DemoLoginService();
        loginPane = new JXLoginPane(service);
       
        loginLauncher = new JButton();
        loginLauncher.setName("launcher");
        add(loginLauncher, BorderLayout.NORTH);
       
View Full Code Here

Examples of org.jdesktop.swingx.JXLoginPane

  public static void askLoginInformation() {
    SwingUtilities.invokeLater(new Runnable() {

      @Override
      public void run() {
        JXLoginPane loginPanel = new JXLoginPane(new LoginService() {

          @Override
          public boolean authenticate(String arg0, char[] arg1, String arg2) throws Exception {
            return true;
          }
        });
        loginPanel.setMessage("Please your password for Last.fm account:");
        loginPanel.setBannerText("Last.fm login");
        if (JXLoginPane.showLoginDialog(null, loginPanel) == JXLoginPane.Status.SUCCEEDED) {
          properties.setProperty(USER, loginPanel.getUserName());
          String encPassword = encryptPassword(String.valueOf(loginPanel.getPassword()));
          properties.setProperty(PASSWORD, encPassword);
          // Write properties file.
          try {
            properties.store(new FileOutputStream(getResource("g15lastfm.properties").getPath()), null);
          } catch (IOException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.