Orcworm.co.uk

Full Version: Help Coding
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to code a GUI button that links to my YouTube.
I've got the button created and everything, I just don't know how to get it to link to my YouTube channel.
>coding a client

>selfplug when they can just look up your name

>releasing your client to some of the real dumbshits to use

When people download your client, where do they get it from? Oh right, YOUR CHANNEL.
In the EventListener for the button, put this:
Code:
URI uri = new URI("http://youtube.com/your_channel");
Desktop desktop = Desktop.getDesktop();
desktop.browse(uri);

You will also need these two imports:
Code:
import java.awt.Desktop;
import java.net.URI;
Thanks works great man.
+3