I've always used:
if (Desktop.isDesktopSupported())
Desktop.getDesktop().browse(new URI("www.google.com"));
Type: Posts; User: Trey
I've always used:
if (Desktop.isDesktopSupported())
Desktop.getDesktop().browse(new URI("www.google.com"));
To add an image to a swing component simply create a new label without any text and use setIcon(Icon) to set its icon.
Currently you have the button on a JPanel, so the parent of the button is the panel. Your trying to access the PFrame object, which is the parent of the JPanel:
class ActListener implements...