Jump to content
Sign in to follow this  
Im Chaz

(Any revision) Lite Game Launcher

Recommended Posts

This is a lite game launcher I made quite some time ago and I've decided to release it. I know that its not hard to make obviously but maybe some people might want something like this.

Here is a preview of what it looks like, feel free to edit it as you wish. I know it's a tad bit 'ugly' I guess but this was my first GUI that I've made ever.
[ATTACH=CONFIG]9142[/ATTACH]

Please note:

[LIST]
[*]Before using the game launcher I recommend that you save the images and upload them to an image uploading site that you prefer. I may or may not delete the images from my Imgur which will cause the buttons and most things not to show (seeing as everything pretty much loads through my Imgur account in which has all of the images that contain on this frame).
[*]You will need to download substance.jar so that you can get themes going onto this lite game launcher.
[*]If you have any problems with it or want me to upload the substance.jar for you too use feel free to post or send me a private message and I'll try to get to you as soon as possible.
[/LIST]

[CODE]import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.net.URL;


import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.border.EmptyBorder;


import com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel;


/**
* @Author Chaz <Skype: chazkohatsu>
* Sep 3, 2013 | 9:41:15 PM |
*/
@SuppressWarnings("serial")
public class GameLauncher extends JFrame {


/**
* Launches the application.
*
* @param args
* @throws IOException
*/
@SuppressWarnings("deprecation")
public static void main(String[] args) throws IOException {
try {
/** Substance look and feel */
UIManager.setLookAndFeel(new NimbusLookAndFeel());
} catch (UnsupportedLookAndFeelException ulafe) {
Loader loader = new Loader();
loader.doFrame();
}
GameLauncher Loader = new GameLauncher();
Loader.setVisible(true);
}


/**
* Creates the main frame of the application being initiated.
* @throws IOException
*/
public GameLauncher() throws IOException {
/** The name of the frame */
super(Loader.GAME_NAME + " Game Launcher!");


/** Creates and adds the main configurations of the frame */
String getIconLink = "http://i.imgur.com/Xh9Pmlc.png";
URL getIcon = new URL(getIconLink);

this.setIconImage(Toolkit.getDefaultToolkit().getImage(getIcon));
this.setSize(new Dimension(337, 229));
this.setLocationRelativeTo(null);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setResizable(false);
getContentPane().setLayout(null);

/**
* Creates and adds the logo of our game.
*/
JLabel Logo = new JLabel("");


String getLogoLink = "http://i.imgur.com/ZLJnSfP.png";
URL getLogo = new URL(getLogoLink);


Logo.setBounds(-29, 11, 357, 106);
Logo.setIcon(new ImageIcon(getLogo));
getContentPane().add(Logo);

/**
* Adds the "play now" button to the frame and also decides the action
* of the "play now" button.
*/
String getLinkOne = "http://i.imgur.com/xPIjrez.png";
URL getIconOne = new URL(getLinkOne);
String getHoverLinkOne = "http://i.imgur.com/uGwtixc.png";
URL getHoverIconOne = new URL(getHoverLinkOne);


JButton Launch = new JButton(new ImageIcon(getIconOne));
Launch.setToolTipText("Access our games client by clicking this button.");
Launch.setRolloverIcon(new ImageIcon(getHoverIconOne));
Launch.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
try {
setVisible(false);
Loader client = new Loader();
client.doFrame();
} catch (Exception e) {
JOptionPane
.showMessageDialog(
null,
"An error has occurred! It looks like the game launcher was unable to access our game client. "
+ "\nIf you experience this problem more than once pleaser report it to a developer or create a post "
+ "\non our forums.");
}
}
});
Launch.setBorder(new EmptyBorder(0, 0, 0, 0));
Launch.setOpaque(false);
Launch.setContentAreaFilled(false);
Launch.setBorderPainted(false);
Launch.setFocusPainted(false);
Launch.setBounds(215, 152, 106, 38);
getContentPane().add(Launch);


/**
* Adds the "home" button to the frame and also decides the action of
* the "home" button.
*/
String getLinkTwo = "http://i.imgur.com/Jj4AM7x.png";
URL getIconTwo = new URL(getLinkTwo);
String getHoverLinkTwo = "http://i.imgur.com/oNaBdDw.png";
URL getHoverIconTwo = new URL(getHoverLinkTwo);


JButton Home = new JButton(new ImageIcon(getIconTwo));
Home.setToolTipText("Access our websites home page by clicking this button.");
Home.setRolloverIcon(new ImageIcon(getHoverIconTwo));
Home.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
String URL = "http://www.google.com/";
try {
java.awt.Desktop.getDesktop().browse(
java.net.URI.create(URL));
} catch (IOException e) {
e.printStackTrace();
}
}
});
Home.setBorder(new EmptyBorder(0, 0, 0, 0));
Home.setOpaque(false);
Home.setContentAreaFilled(false);
Home.setBorderPainted(false);
Home.setFocusPainted(false);
Home.setBounds(10, 152, 106, 38);
getContentPane().add(Home);
}
}[/CODE]

Again this is a lite game launcher so it is pretty small. If you want to edit the logo upload a logo and change the link that determines my logo. You may or may not have to re-size the game launcher depending on how big your logo is. I'm releasing this because it's old work and honestly I don't think I have use for this game launcher since I've been making new ones. If theres anything I can improve on please post so that I can learn from mistakes or just learn in general. If you need help please refer to the help section.

Any feed back is greatly appreciated but I've improved since this GUI looking back at this i'm deeply ashamed but yeah all feed back is still appreciated.

The download for the substance library.
[url]http://www.mediafire.com/download/ed015ovzk670tcm/substance.jar[/url]

Share this post


Link to post
Share on other sites
Needs more feedback :).

Share this post


Link to post
Share on other sites
Not a big fan of launchers, nice job though.

Sent from my LG-L38C using Tapatalk 2

Share this post


Link to post
Share on other sites
[quote name='Xiles']Not a big fan of launchers, nice job though.

Sent from my LG-L38C using Tapatalk 2[/QUOTE]
Is that a phone, anyways thanks.
[quote name='DDS4u']Needs more feedback :).[/QUOTE]
Thanks, and yeah any feed back is well appreciated.

Share this post


Link to post
Share on other sites
[quote name='Im Chaz']Is that a phone, anyways thanks.

Thanks, and yeah any feed back is well appreciated.[/QUOTE]

Yes its a phone. Some kind of Droid.

Sent from my LG-L38C using Tapatalk 2

Share this post


Link to post
Share on other sites
[quote name='Xiles']Yes its a phone. Some kind of Droid.

Sent from my LG-L38C using Tapatalk 2[/QUOTE]
Oh, haha.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×