java app for crypto marketsteemCreated with Sketch.

in #java7 years ago

 Hello dear steemit friends,
today i am  going to show you how to create small java application for coin market.  first you need to small things.
1.small java knowledge2.java development kit ( JDK ) you can download3.IDE ( i am using netbeans )4.small brain5.1 laptop 6.2 hand7.jsoup library

 ok guys, now  we are ready for do that. 
 install netbeans ide and after 
1. file >> New project >> Java >> Java application >> project name and path >> finish


fisrt you need to design this user interface using netbeans ide or another ide.
THIS IS VERY IMPORTENT :  add jsoup libry to you project. google " how to add libry to netbeans project"
![Screenshot_2.png]()
and we are going to code our application.  no no it is not complicated. too easy . 
 double click "start market button" or right click  Event >> action >> action performed then code like this.

    javax.swing.Timer t;
        t = new javax.swing.Timer(1000, new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {


                Document doc;
                try {


                    String y=a.getText();
                   
                    // need http protocol
                    doc = Jsoup.connect("https://coinmarketcap.com/currencies/digibyte/").get();


                    Elements divTag = doc.getElementsByClass("text-gray");


                    System.out.println(divTag.text());


                    String x = divTag.text().toString();
                    String fi = "";
                    for (int i = 0; i < 11; i++) {


                        char c = x.charAt(i);
                        fi = fi + c;
                    }
                    System.out.println(fi);


                    ta.setText(fi);
                    
                  
                    
                    if (ta.getText().equals(a.getText())) {
                        System.out.println("yes");
                        Toolkit.getDefaultToolkit().beep();
                        
                    }


                } catch (java.net.UnknownHostException rt) {


                   
                    JOptionPane.showMessageDialog(createRootPane(),"not a internet connection");
                     System.exit(0);
                } catch (IOException d) {
                }


            }
        });
        t.start();

      thats it. now you can run your java application. and click start market button its will gave values.
        ohhh its working.....

        ![Screenshot_3.png]()
    now i can do small explain in code. look at this line.
   " doc = Jsoup.connect("https://coinmarketcap.com/currencies/digibyte/").get();"
     you can change this link to other currancy. like this.
   " doc = Jsoup.connect("https://coinmarketcap.com/currencies/dash/").get();"      i think you are enjoying this article.  i hope to another  tutorial for   crypto application.    you can develop this application. this is too small.    hope you learn something.
  Good Luck! 

Sort:  

Congratulations @sandun! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Coin Marketplace

STEEM 0.17
TRX 0.13
JST 0.028
BTC 56482.82
ETH 3004.94
USDT 1.00
SBD 2.21