Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,691 members, 7,955,606 topics. Date: Sunday, 22 September 2024 at 10:41 AM |
Nairaland Forum / Science/Technology / Programming / Java Programmers Please Help (891 Views)
Java Programmers ,I Need Help Fixing This Code. / How Long Did It Take You Guys To Become Strong Java Programmers / Android Java Programmers, Please Help Me Look Into This (2) (3) (4)
Java Programmers Please Help by klark3: 10:02am On Jun 21, 2015 |
I'm currently working on a java desktop application project and I'm using netbeans 8.0 IDE .. I'm trying to implement an Action Listener to open a web link on the user default web browser when a jbutton is clicked . i have tried so many online tutorials but nothing seems to be working . please how do i implement this on netbeans 8.0 IDE and make it work .. |
Re: Java Programmers Please Help by GuiltySpark343(m): 12:42am On Jun 22, 2015 |
am an intermediate level java SE (i havent entered EE) programmer...Hhmm this requires an expert level programmer...Hhmm two independent programmes interacting with each other...normally what programmes do is to use hardware resources to accomplish tasks...try googling it and see if somebody has asked similar question especially on a "stackoverflow" |
Re: Java Programmers Please Help by javadoctor(m): 6:20am On Jun 22, 2015 |
jButton1.addActionListener(new ActionListener(){ public void actionPerforned(){ // execute bash script String command = "chrome http://www.google.com"; new ExecuteShellCommand.executeCommand(command); } } ); |
Re: Java Programmers Please Help by GuiltySpark343(m): 7:36am On Jun 22, 2015 |
javadoctor: Bad I declare this thread closed but what does the chrome in the string declaration stand for |
Re: Java Programmers Please Help by Knownpal(m): 9:07am On Jun 22, 2015 |
Use desktop integration. //googleOut |
Re: Java Programmers Please Help by seunthomas: 9:13am On Jun 22, 2015 |
javadoctor:Good job this will fail if chrome is not installed on the system(Many new systems dont have chrome). import java.awt.Desktop; import java.net.URI; jButton1.addActionListener(new ActionListener(){ public void actionPerforned(){ // execute bash script //String command = "chrome http://www.google.com"; //new ExecuteShellCommand.executeCommand(command); if(Desktop.isDesktopSupported()) { Desktop.getDesktop().browse(new URI("http://www.example.com")); } } } //CREDIT GOES TO javadoctor: ); |
Re: Java Programmers Please Help by Foxybone(m): 7:25pm On Jun 22, 2015 |
javadoctor: Uhm, had to poke my nose here... I think I will have to get comfortable in this section. please welcome me ohh cos this is where my future lie.. |
Re: Java Programmers Please Help by Nigara: 2:05pm On Jun 23, 2015 |
javadoctor: bro debug you post... |
(1) (Reply)
Pls I Need Pcb Board Control Panel**picture Attached Too The Post / I Need A Website Designer / Tips On Computer Desktop Publishing
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 11 |