Aug 22, 2015 07:42 PM
(This post was last modified: Aug 22, 2015 07:44 PM by The Sly.)
Hey guys i found this again on my mail acc ( coded this a while ago and sent the sourcecode there) and i thought id share this is not useful in any way but its fun and u can further dev it to make it cooler
This is basically a Windows 8.1 but made in java once u start the app u come to a screen like this http://images.pcworld.com/images/article...331051.png
im was working also on a login system which brings u to a desktop ( u could do that)
all the apps work their either links or hardcoded paths for apps in the system :)
the pictures are missing but u can just use any picture you got on ur system and later on when compiled check which belongs where
Pls no hate its just a fun project i did once nothing thats ever to be considered usefull :)
This is basically a Windows 8.1 but made in java once u start the app u come to a screen like this http://images.pcworld.com/images/article...331051.png
im was working also on a login system which brings u to a desktop ( u could do that)
all the apps work their either links or hardcoded paths for apps in the system :)
the pictures are missing but u can just use any picture you got on ur system and later on when compiled check which belongs where
Code
package MyPanel;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import javax.swing.*;
public class Panel extends JFrame
{
/**
*
*/
private static final long serialVersionUID = 1L;
public Panel()
{
initializeUI();
}
private void initializeUI()
{
ImagePanel panel = new ImagePanel(new ImageIcon("res/background.png").getImage());
setSize(1600, 860);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
BufferedImage bi = new BufferedImage(this.getSize().width, this.getSize().height, BufferedImage.TYPE_INT_ARGB);
Graphics g = bi.createGraphics();
this.paint(g);
g.dispose();
// Buttons
Icon a = new ImageIcon(getClass().getResource("desktop.png"));
JButton buttonDesktop = new JButton(a);
buttonDesktop.setBounds(100, 200, 230, 115);
Icon datum = new ImageIcon(getClass().getResource("datum.png"));
JButton buttonDatum = new JButton(datum);
buttonDatum.setBounds(340, 200, 230, 115);
buttonDatum.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
try
{
String command = "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE http://www.msn.com/de-de/nachrichten/";
Process link = Runtime.getRuntime().exec(command);
}
catch (Exception ex)
{
System.out.println("cannot execute command. " + ex);
}
}
});
Icon internet = new ImageIcon(getClass().getResource("internet.png"));
JButton buttonInternet = new JButton(internet);
buttonInternet.setBounds(580, 200, 115, 115);
buttonInternet.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
try
{
String command = "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE http://www.msn.com/";
Process link = Runtime.getRuntime().exec(command);
}
catch (Exception ex)
{
System.out.println("cannot execute command. " + ex);
}
}
});
Icon store = new ImageIcon(getClass().getResource("store.png"));
JButton buttonStore = new JButton(store);
buttonStore.setBounds(700, 200, 115, 115);
buttonStore.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
try
{
String command = "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE http://www.microsoftstore.com/store/msde/de_DE/home?WT.mc_id=2211&tduid=8b4b828a7703df323095ca22e3b66b4e";
Process link = Runtime.getRuntime().exec(command);
}
catch (Exception ex)
{
System.out.println("cannot execute command. " + ex);
}
}
});
Icon mail = new ImageIcon(getClass().getResource("mail.png"));
JButton buttonMail = new JButton(mail);
buttonMail.setBounds(100, 327, 230, 115);
buttonMail.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
try
{
String command = "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE http://www.live.de/";
Process link = Runtime.getRuntime().exec(command);
}
catch (Exception ex)
{
System.out.println("cannot execute command. " + ex);
}
}
});
Icon fotos = new ImageIcon(getClass().getResource("fotos.png"));
JButton buttonFotos = new JButton(fotos);
buttonFotos.setBounds(340, 327, 230, 115);
Icon maps = new ImageIcon(getClass().getResource("maps.png"));
JButton buttonMaps = new JButton(maps);
buttonMaps.setBounds(580, 327, 115, 115);
buttonMaps.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
try
{
String command = "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE http://www.bing.com/maps/?mkt=de-de";
Process link = Runtime.getRuntime().exec(command);
}
catch (Exception ex)
{
System.out.println("cannot execute command. " + ex);
}
}
});
Icon drive = new ImageIcon(getClass().getResource("drive.png"));
JButton buttonDrive = new JButton(drive);
buttonDrive.setBounds(700, 327, 115, 115);
Icon kontakte = new ImageIcon(getClass().getResource("kontakte.png"));
JButton buttonKontakte = new JButton(kontakte);
buttonKontakte.setBounds(100, 455, 230, 115);
Icon video = new ImageIcon(getClass().getResource("video.png"));
JButton buttonVideo = new JButton(video);
buttonVideo.setBounds(340, 455, 230, 115);
Icon musik = new ImageIcon(getClass().getResource("musik.png"));
JButton buttonMusik = new JButton(musik);
buttonMusik.setBounds(580, 455, 235, 115);
Icon nachrichten = new ImageIcon(getClass().getResource("nachrichten.png"));
JButton buttonNachrichten = new JButton(nachrichten);
buttonNachrichten.setBounds(100, 580, 232, 115);
Icon wetter = new ImageIcon(getClass().getResource("wetter.png"));
JButton buttonWetter = new JButton(wetter);
buttonWetter.setBounds(340, 580, 232, 115);
buttonWetter.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
try
{
String command = "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE http://www.msn.com/de-de/wetter";
Process link = Runtime.getRuntime().exec(command);
}
catch (Exception ex)
{
System.out.println("cannot execute command. " + ex);
}
}
});
Icon xbox = new ImageIcon(getClass().getResource("xbox.png"));
JButton buttonXbox = new JButton(xbox);
buttonXbox.setBounds(580, 580, 115, 115);
buttonXbox.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
try
{
String command = "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE http://www.xbox.com/de-DE/games/xbox-one?xr=shellnav";
Process link = Runtime.getRuntime().exec(command);
}
catch (Exception ex)
{
System.out.println("cannot execute command. " + ex);
}
}
});
Icon kamera = new ImageIcon(getClass().getResource("kamera.png"));
JButton buttonKamera = new JButton(kamera);
buttonKamera.setBounds(700, 580, 115, 115);
Icon nachrichten2 = new ImageIcon(getClass().getResource("nachrichten2.png"));
JButton buttonNachrichten2 = new JButton(nachrichten2);
buttonNachrichten2.setBounds(870, 200, 232, 115);
buttonNachrichten2.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
try
{
String command = "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE http://www.msn.com/de-de/nachrichten/";
Process link = Runtime.getRuntime().exec(command);
}
catch (Exception ex)
{
System.out.println("cannot execute command. " + ex);
}
}
});
Icon sport = new ImageIcon(getClass().getResource("sport.png"));
JButton buttonSport = new JButton(sport);
buttonSport.setBounds(870, 328, 232, 115);
buttonSport.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
try
{
String command = "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE http://www.msn.com/de-de/sport/";
Process link = Runtime.getRuntime().exec(command);
}
catch (Exception ex)
{
System.out.println("cannot execute command. " + ex);
}
}
});
Icon reise = new ImageIcon(getClass().getResource("reise.png"));
JButton buttonReise = new JButton(reise);
buttonReise.setBounds(870, 455, 232, 115);
buttonReise.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
try
{
String command = "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE http://www.msn.com/de-at/reisen/";
Process link = Runtime.getRuntime().exec(command);
}
catch (Exception ex)
{
System.out.println("cannot execute command. " + ex);
}
}
});
Icon finanzen = new ImageIcon(getClass().getResource("finanzen.png"));
JButton buttonFinanzen = new JButton(finanzen);
buttonFinanzen.setBounds(870, 581, 232, 115);
buttonFinanzen.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
try
{
String command = "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE http://www.msn.com/de-de/finanzen/";
Process link = Runtime.getRuntime().exec(command);
}
catch (Exception ex)
{
System.out.println("cannot execute command. " + ex);
}
}
});
Icon user = new ImageIcon(getClass().getResource("user.png"));
JButton buttonUser = new JButton(user);
buttonUser.setBounds(1300, 80, 100, 100);
Icon login = new ImageIcon(getClass().getResource("login.png"));
JButton buttonLogin = new JButton(login);
buttonLogin.setBounds(1430, 220, 30, 30);
// Textfields
JTextField textField = new JTextField("Benutzername");
textField.setBounds(1300, 220, 100, 20);
JTextField textField2 = new JTextField("Passwort");
textField2.setBounds(1300, 260, 100, 20);
JLabel start = new JLabel("Start");
start.setLocation(100, 100);
start.setSize(100, 86);
start.setFont(new Font("Serif", Font.BOLD, 45));
start.setForeground(Color.WHITE);
// //////
setContentPane(panel);
panel.add(start);
panel.add(buttonDesktop);
panel.add(buttonDatum);
panel.add(buttonInternet);
panel.add(buttonStore);
panel.add(buttonMail);
panel.add(buttonDrive);
panel.add(buttonKontakte);
panel.add(buttonFotos);
panel.add(buttonMaps);
panel.add(buttonVideo);
panel.add(buttonMusik);
panel.add(buttonNachrichten);
panel.add(buttonWetter);
panel.add(buttonXbox);
panel.add(buttonKamera);
panel.add(buttonNachrichten2);
panel.add(buttonSport);
panel.add(buttonReise);
panel.add(buttonFinanzen);
panel.add(buttonUser);
panel.add(textField);
panel.add(textField2);
panel.add(buttonLogin);
}
public static void main(String[] args)
{
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
new Panel().setVisible(true);
}
});
}
}Pls no hate its just a fun project i did once nothing thats ever to be considered usefull :)


