How to create Cryptocurancy App using java

in #technology7 years ago

Hello dear steemit friends,

<p dir="auto">today i am going to show you how to create small java application for coin market. first you need to small things. <p dir="auto">1.small java knowledge<br /> 2.java development kit ( JDK ) you can download<br /> 3.IDE ( i am using netbeans )<br /> 4.small brain<br /> 5.1 laptop<br /> 6.2 hand<br /> 7.jsoup library <p dir="auto">ok guys, now we are ready for do that. <p dir="auto">install netbeans ide and after <ol> <li>file >> New project >> Java >> Java application >> project name and path >> finish <p dir="auto">fisrt you need to design this user interface using netbeans ide or another ide. <p dir="auto">THIS IS VERY IMPORTENT : add jsoup libry to you project. google " how to add libry to netbeans project" <p dir="auto"><img src="https://images.hive.blog/768x0/https://steemitimages.com/DQmNQEtzu4pu1NGJaBATp31sm5HRyFguG5ojAX9JSxzvWBV/Screenshot_2.png" alt="Screenshot_2.png" srcset="https://images.hive.blog/768x0/https://steemitimages.com/DQmNQEtzu4pu1NGJaBATp31sm5HRyFguG5ojAX9JSxzvWBV/Screenshot_2.png 1x, https://images.hive.blog/1536x0/https://steemitimages.com/DQmNQEtzu4pu1NGJaBATp31sm5HRyFguG5ojAX9JSxzvWBV/Screenshot_2.png 2x" /> <p dir="auto">and we are going to code our application. no no it is not complicated. too easy . <p dir="auto">double click "start market button" or right click Event >> action >> action performed<br /> then code like this. <pre><code> 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](https://steemitimages.com/DQmcmJQsYU4sN9ZigjQRF8HDVHD1UU5wdvzZbfdgVdbswru/Screenshot_3.png) now i can do small explain in code. look at this line. <p dir="auto"><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();" <pre><code> you can change this link to other currancy. like this. <p dir="auto"><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();" <pre><code> 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. <p dir="auto">Good Luck!