java app for crypto market

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"

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. ![Screenshot_2.png]()

<pre><code>    javax.swing.Timer t;<br />         t = new javax.swing.Timer(1000, new ActionListener() {<br />             @Override<br />             public void actionPerformed(ActionEvent e) {<br /> <br /> <br />                 Document doc;<br />                 try {<br /> <br /> <br />                     String y=a.getText();<br />                    <br />                     // need http protocol<br />                     doc = Jsoup.connect("https://coinmarketcap.com/currencies/digibyte/").get();<br /> <br /> <br />                     Elements divTag = doc.getElementsByClass("text-gray");<br /> <br /> <br />                     System.out.println(divTag.text());<br /> <br /> <br />                     String x = divTag.text().toString();<br />                     String fi = "";<br />                     for (int i = 0; i < 11; i++) {<br /> <br /> <br />                         char c = x.charAt(i);<br />                         fi = fi + c;<br />                     }<br />                     System.out.println(fi);<br /> <br /> <br />                     ta.setText(fi);<br />                     <br />                   <br />                     <br />                     if (ta.getText().equals(a.getText())) {<br />                         System.out.println("yes");<br />                         Toolkit.getDefaultToolkit().beep();<br />                         <br />                     }<br /> <br /> <br />                 } catch (java.net.UnknownHostException rt) {<br /> <br /> <br />                    <br />                     JOptionPane.showMessageDialog(createRootPane(),"not a internet connection");<br />                      System.exit(0);<br />                 } catch (IOException d) {<br />                 }<br /> <br /> <br />             }<br />         });<br />         t.start(); <p dir="auto">      thats it. now you can run your java application. and click start market button its will gave values.<br />         ohhh its working.....<br /> <br /><br />     now i can do small explain in code. look at this line.<br /><br />      you can change this link to other currancy. like this.<br /><br />   Good Luck! <span>         ![Screenshot_3.png](<img src="https://images.hive.blog/768x0/https://steemitimages.com/DQmcmJQsYU4sN9ZigjQRF8HDVHD1UU5wdvzZbfdgVdbswru/Screenshot_3.png" srcset="https://images.hive.blog/768x0/https://steemitimages.com/DQmcmJQsYU4sN9ZigjQRF8HDVHD1UU5wdvzZbfdgVdbswru/Screenshot_3.png 1x, https://images.hive.blog/1536x0/https://steemitimages.com/DQmcmJQsYU4sN9ZigjQRF8HDVHD1UU5wdvzZbfdgVdbswru/Screenshot_3.png 2x" />) <span>    " doc = Jsoup.connect("<a href="https://coinmarketcap.com/currencies/digibyte/" target="_blank" rel="nofollow noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">https://coinmarketcap.com/currencies/digibyte/").get();"<span>    " doc = Jsoup.connect("<a href="https://coinmarketcap.com/currencies/dash/" target="_blank" rel="nofollow noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">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.
Sort:  

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

<p dir="auto"><a href="http://steemitboard.com/@sandun" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link"><img src="https://images.hive.blog/768x0/https://steemitimages.com/70x80/http://steemitboard.com/notifications/voted.png" srcset="https://images.hive.blog/768x0/https://steemitimages.com/70x80/http://steemitboard.com/notifications/voted.png 1x, https://images.hive.blog/1536x0/https://steemitimages.com/70x80/http://steemitboard.com/notifications/voted.png 2x" /> Award for the number of upvotes received <p dir="auto">Click on any badge to view your own Board of Honor on SteemitBoard.<br /> For more information about SteemitBoard, click <a href="https://steemit.com/@steemitboard" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">here <p dir="auto">If you no longer want to receive notifications, reply to this comment with the word <code>STOP <blockquote> <p dir="auto">By upvoting this notification, you can help all Steemit users. Learn how <a href="https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">here!