Gerenciador De Aplicativos Em Java

Propaganda
package gerenciador;
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
import
javax.swing.ButtonGroup;
javax.swing.ImageIcon;
javax.swing.JOptionPane;
javax.swing.JRadioButton;
javax.swing.SwingConstants;
javax.swing.SwingUtilities;
javax.swing.JPanel;
javax.swing.JFrame;
javax.swing.JTabbedPane;
javax.swing.Timer;
javax.swing.UIManager;
java.awt.Color;
java.awt.Component;
java.awt.Cursor;
java.awt.Event;
java.awt.Font;
java.awt.Rectangle;
java.awt.event.ActionEvent;
java.awt.event.ActionListener;
java.awt.event.ItemEvent;
java.awt.event.ItemListener;
java.awt.event.KeyEvent;
java.awt.event.KeyListener;
java.io.IOException;
java.net.HttpURLConnection;
java.net.InetAddress;
java.net.MalformedURLException;
java.net.URL;
java.net.URLConnection;
java.net.UnknownHostException;
java.text.DateFormat;
java.util.Calendar;
java.util.GregorianCalendar;
java.util.Locale;
javax.swing.JLabel;
javax.swing.JButton;
gerenciador.AbrirDiretorios;
java.awt.Dimension;
public class Gerenciador extends JFrame implements ActionListener,
KeyListener {
private static final long serialVersionUID = 1L;
protected static final Runtime RunTime = null;
private JButton jbtSobre = null;
private JButton jbtInformacao = null;
private JPanel jContentPane = null;
private JTabbedPane jTabbedPane = null;
private
private
private
private
private
private
JPanel
JPanel
JPanel
JPanel
JPanel
JPanel
jPanelMultiplataforma = null;
jPanelWindows = null;
jPanelLinux = null;
jPanelMacintosh = null;
jPanelSolaris = null;
jPanelAndroid = null;
private
private
private
private
private
private
private
private
private
private
private
JPanel
JPanel
JPanel
JPanel
JPanel
JPanel
JPanel
JPanel
JPanel
JPanel
JPanel
jPanelIBM = null;
jPanelSymbian = null;
jPanelAmigaOS = null;
jPanelUnix = null;
jPanelMinix = null;
jPanelHaiku = null;
jPanelIOS = null;
jPanelOpenBSD = null;
jPanelYouOS = null;
jPanelFreeBSD = null;
jPanelSistemaOperacional = null;
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
JLabel jlbTitulo = null;
JButton jbtWindowsCalculadora = null;
JButton jbtWindowsNotepad = null;
JButton jbtLinuxFirefox = null;
JButton jbtWindowsFirefox = null;
JButton jbtWindowsLogo = null;
JButton jbtLinuxLogo = null;
JButton jbtWindowsExplore = null;
JButton jbtWindowsOpera = null;
JButton jbtWindowsChrome = null;
JButton jbtWindowsSafari = null;
JButton jbtWindowsNetscape = null;
JButton jbtWindowsMediaPlayer = null;
JButton jbtWindowsRealPlayer = null;
JButton jbtWindowsOutLook = null;
JButton jbtWindowsPowerpoint = null;
JButton jbtWindowsExcel = null;
JButton jbtWindowsWord = null;
JButton jbtWindowsPaint = null;
JButton jbtWindowsLimparDisco = null;
JButton jbtWindowsTecladoVirtual = null;
JButton jbtWindowsMSN = null;
JButton jbtWindowsPaciencia = null;
JButton jbtWindowsSpider = null;
JButton jbtMacintoshLogo = null;
JButton jbtSolarisLogo = null;
JButton jbtSymbianLogo = null;
JButton jbtIBMLogo = null;
JButton jbtAndroidLogo = null;
JButton jbtWindowsOrkut = null;
JButton jbtWindowsFacebook = null;
JButton jbtWindowsYoutube = null;
JButton jbtWindowsMyspace = null;
JButton jbtWindowsTwitter = null;
JButton jbtWindowsLinkedIn = null;
JButton jbtWindowsFlickr = null;
JButton jbtWindowsBlogger = null;
JButton jbtWindowsSkype = null;
JButton jbtWindowsIp = null;
JButton jbtWindowsPowerDVD = null;
JButton jbtWindowsNero = null;
JButton jbtLinuxWriter = null;
JButton jbtLinuxCalc = null;
JButton jbtLinuxBase = null;
JButton jbtLinuxImpress = null;
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
JButton jbtLinuxGIMP = null;
JButton jbtLinuxKopete = null;
JButton jbtLinuxPidgin = null;
JButton jbtLinuxAMSN = null;
JButton jbtLinuxTuxPaint = null;
JButton jbtLinuxGNU = null;
JButton jbtLinuxKonqueror = null;
JButton jbtLinuxAmarok = null;
JButton jbtLinuxTotem = null;
JButton jbtLinuxKaffeine = null;
JButton jbtWindowsEbuddy = null;
JButton jbtWindowsAbrirCD = null;
JButton jbtWindowsDiscoC = null;
JButton jbtWindowsDiscoD = null;
JButton jbtWindowsMeusDocumentos = null;
JButton jbtWindowsMinhasImagens = null;
JButton jbtWindowsMinhasMusicas = null;
JButton jbtWindowsMeusVideos = null;
JButton jbtWindowsMeuComputador = null;
JButton jbtWindowsRelogio = null;
JButton jbtLinuxDriveCD = null;
JButton jbtWindowsLixeira = null;
JButton jbtLinuxDiscoC = null;
JButton jbtLinuxDiscoD = null;
JButton jbtMultiplataforma = null;
JButton jbtWindows = null;
JButton jbtAndroid = null;
JButton jbtLinux = null;
JButton jbtMacOS = null;
JButton jbtSolaris = null;
JButton jbtIBM = null;
JButton jbtSymbian = null;
JButton jbtHaiku = null;
JButton jbtUnix = null;
JButton jbtIos = null;
JButton jbtMinix = null;
JButton jbtOpenBSD = null;
JButton jbtFreeBSD = null;
JButton jbtAmigaOS = null;
JButton jbtYouOS = null;
JLabel jlbRelogio = null;
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
Timer timer;
static JLabel jlbData = null;
JButton jbtWindowsPhotoshop = null;
JRadioButton jrbMetal = null;
JRadioButton jrbMotif = null;
JRadioButton jrbNimbus = null;
JRadioButton jrbWindows = null;
JRadioButton jrbWindowsClassico = null;
ButtonGroup grupo = new ButtonGroup();
JButton jbtAmigaOSLogo = null;
JButton jbtUnixLogo = null;
JButton jbtIOSLogo = null;
JButton jbtOpenBSDLogo = null;
JButton jbtMinixLogo = null;
JButton jbtHaikuLogo = null;
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
JButton jbtYouOSLogo = null;
JButton jbtFreeBSDLogo = null;
JButton jbtWindowsMovieMaker = null;
JLabel jlbInformacaoDoSistema = null;
JLabel jlbUsuarioNome = null;
JLabel jlbUsuario = null;
JLabel jlbVersaoDoJava = null;
JLabel jlbVersaoJava = null;
JLabel jlbVersao = null;
JLabel jlbVersaoDoSistema = null;
JLabel jlbSistemaOpreacional = null;
JLabel jlbSistema = null;
JLabel jlbLinguaUsuario = null;
JLabel jlbPaisUsuario = null;
JLabel jlbLingua = null;
JLabel jlbPais = null;
UIManager.LookAndFeelInfo[] looks = UIManager
.getInstalledLookAndFeels();
private JRadioButton[] escolha = new JRadioButton[looks.length];
private JLabel jlbConexao = null;
private JLabel jlbChecandoConexao = null;
public void Relogio() {
disparaRelogio();
}
public void disparaRelogio() {
if (timer == null) {
timer = new Timer(1000, this);
timer.setInitialDelay(0);
timer.start();
} else if (!timer.isRunning()) {
timer.restart();
}
}
// ****************************************Começo da JTabbedPane
private JTabbedPane getJTabbedPane() {
if (jTabbedPane == null) {
jTabbedPane = new JTabbedPane();
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Favorites.png"));
// jTabbedPane.setTabPlacement(JTabbedPane.BOTTOM);//Local
das abas
// jTabbedPane.setTabPlacement(JTabbedPane.RIGHT);
// jTabbedPane.setTabPlacement(JTabbedPane.LEFT);
jTabbedPane.setBounds(new Rectangle(1, 95, 782, 542));
jTabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
// jTabbedPane.addTab("Symbian", null, getjPanelSymbian(),
// "Symbia");
// jTabbedPane.setSelectedComponent(getjPanelSymbian());
// int i7 = jTabbedPane.getSelectedIndex();
// jTabbedPane.setTabComponentAt(i7, new ButtonTabComponent(
// jTabbedPane));
// jTabbedPane.addTab("IBM OS/2", null, getjPanelIBM(), "IBM
OS/2");
//
//
//
//
jTabbedPane.setSelectedComponent(getjPanelIBM());
int i6 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i6, new ButtonTabComponent(
jTabbedPane));
//
//
//
//
//
//
jTabbedPane.addTab("Android", null, getjPanelAndroid(),
"Android");
jTabbedPane.setSelectedComponent(getjPanelAndroid());
int i5 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i5, new ButtonTabComponent(
jTabbedPane));
//
//
//
//
//
//
jTabbedPane.addTab("Solaris", null, getjPanelSolaris(),
"Solaris");
jTabbedPane.setSelectedComponent(getjPanelSolaris());
int i4 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i4, new ButtonTabComponent(
jTabbedPane));
//
//
//
//
//
//
jTabbedPane.addTab("Mac OS", null, getjPanelMacintosh(),
"Mac OS");
jTabbedPane.setSelectedComponent(getjPanelMacintosh());
int i3 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i3, new ButtonTabComponent(
jTabbedPane));
// jTabbedPane.addTab("Linux", null, getjPanelLinux(),
"Linux");
//
//
//
//
jTabbedPane.setSelectedComponent(getjPanelLinux());
//int i2 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i2, new ButtonTabComponent(
jTabbedPane));
//
//
//
//
//
//
jTabbedPane.addTab("Windows", null, getjPanelWindows(),
"Windows");
jTabbedPane.setSelectedComponent(getjPanelWindows());
int i1 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i1, new ButtonTabComponent(
jTabbedPane));
jTabbedPane.addTab("Gerenciamento", icone,
getjPanelMultiplataforma(), "Gerenciamento");
//
jTabbedPane.setSelectedComponent(getjPanelMultiplataforma());
// int i = jTabbedPane.getSelectedIndex();
// jTabbedPane.setTabComponentAt(i,
// new ButtonTabComponent(jTabbedPane));
// ****************************************Fim da JTabbedPane
}
return jTabbedPane;
}
// *****************************************Começo das abas
private Component getjPanelMultiplataforma() {
if (jPanelMultiplataforma == null) {
jPanelMultiplataforma = new JPanel();
jPanelMultiplataforma.setLayout(null);
// Cor de fundo branco
jPanelMultiplataforma.setBackground(Color.WHITE);
jPanelMultiplataforma.add(getjbtWindows(), null);
jPanelMultiplataforma.add(getJbtAndroid(), null);
jPanelMultiplataforma.add(getJbtLinux(), null);
jPanelMultiplataforma.add(getJbtMacOS(), null);
jPanelMultiplataforma.add(getJbtSolaris(), null);
jPanelMultiplataforma.add(getJbtIBM(), null);
jPanelMultiplataforma.add(getJbtSymbian(), null);
jPanelMultiplataforma.add(getjbtHaiku(), null);
jPanelMultiplataforma.add(getjbtUnix(), null);
jPanelMultiplataforma.add(getjbtIos(), null);
jPanelMultiplataforma.add(getjbtMinix(), null);
jPanelMultiplataforma.add(getjbtOpenBSD(), null);
jPanelMultiplataforma.add(getjbtFreeBSD(), null);
jPanelMultiplataforma.add(getjbtAmigaOS(), null);
jPanelMultiplataforma.add(getJbtYouOS(), null);
jPanelMultiplataforma.add(getJbtMultiplataforma(), null);
}
return jPanelMultiplataforma;
}
private JPanel getjPanelWindows() {// **********Aba Windows
if (jPanelWindows == null) {
jPanelWindows = new JPanel();
// Cor de fundo azul
jPanelWindows.setBackground(new Color(0, 104, 139));
jPanelWindows.setLayout(null);
jPanelWindows.add(getJbtWindowsLogo(), null);
jPanelWindows.add(getjbtWindowsDiscoC(), null);
jPanelWindows.add(getjbtWindowsMeuComputador(), null);
jPanelWindows.add(getjbtWindowsMeusDocumentos(), null);
jPanelWindows.add(getjbtWindowsMinhasImagens(), null);
jPanelWindows.add(getjbtWindowsMinhasMusicas(), null);
jPanelWindows.add(getjbtWindowsMeusVideos(), null);
jPanelWindows.add(getjbtWindowsDiscoD(), null);
jPanelWindows.add(getJbtWindowsCalculadora(), null);
jPanelWindows.add(getJbtWindowsNotepad(), null);
jPanelWindows.add(getJbtWindowsWord(), null);
jPanelWindows.add(getJbtWindowsExcel(), null);
jPanelWindows.add(getJbtWindowsPowerpoint(), null);
jPanelWindows.add(getJbtWindowsOutLook(), null);
jPanelWindows.add(getJbtWindowsPaint(), null);
jPanelWindows.add(getJbtWindowsExplore(), null);
jPanelWindows.add(getJbtWindowsFirefox(), null);
jPanelWindows.add(getjbtWindowsChrome(), null);
jPanelWindows.add(getjbtWindowsOpera(), null);
jPanelWindows.add(getJbtWindowsSafari(), null);
jPanelWindows.add(getJbtWindowsNetscape(), null);
jPanelWindows.add(getJbtWindowsEbuddy(), null);
jPanelWindows.add(getJbtWindowsFacebook(), null);
jPanelWindows.add(getjbtWindowsOrkut(), null);
jPanelWindows.add(getJbtWindowsMyspace(), null);
jPanelWindows.add(getJbtWindowsTwitter(), null);
jPanelWindows.add(getJbtWindowsBlogger(), null);
jPanelWindows.add(getJbtWindowsLinkedIn(), null);
jPanelWindows.add(getJbtWindowsFlickr(), null);
jPanelWindows.add(getJbtWindowsYoutube(), null);
jPanelWindows.add(getJbtWindowsMSN(), null);
jPanelWindows.add(getJbtWindowsSkype(), null);
jPanelWindows.add(getJbtWindowsPowerDVD(), null);
jPanelWindows.add(getJbtWindowsNero(), null);
jPanelWindows.add(getjbtWindowsMediaPlayer(), null);
jPanelWindows.add(getjbtWindowsRealPlayer(), null);
jPanelWindows.add(getjbtWindowsAbrirCD(), null);
jPanelWindows.add(getJbtWindowsLimparDisco(), null);
jPanelWindows.add(getJbtWindowsTecladoVirtual(), null);
jPanelWindows.add(getJbtWindowsSpider(), null);
jPanelWindows.add(getJbtWindowsPaciencia(), null);
jPanelWindows.add(getJbtWindowsIp(), null);
jPanelWindows.add(getJbtWindowsRelogio(), null);
jPanelWindows.add(getJbtWindowsLixeira(), null);
jPanelWindows.add(getjbtWindowsPhotoshop(), null);
jPanelWindows.add(getJbtWindowsMovieMaker(), null);
}
return jPanelWindows;
}
private JPanel getjPanelLinux() {// **********Aba Linux
if (jPanelLinux == null) {
jPanelLinux = new JPanel();
jPanelLinux.setLayout(null);
jPanelLinux.setBackground(Color.WHITE);
jPanelLinux.add(getjbtLinuxWriter(), null);
jPanelLinux.add(getJbtLinuxCalc(), null);
jPanelLinux.add(getJbtLinuxBase(), null);
jPanelLinux.add(getJbtLinuxImpress(), null);
jPanelLinux.add(getJbtLinuxGIMP(), null);
jPanelLinux.add(getJbtLinuxPidgin(), null);
jPanelLinux.add(getJbtLinuxKopete(), null);
jPanelLinux.add(getJbtLinuxFirefox(), null);
jPanelLinux.add(getJbtLinuxGNU(), null);
jPanelLinux.add(getJbtLinuxKonqueror(), null);
jPanelLinux.add(getJbtLinuxAmarok(), null);
jPanelLinux.add(getJbtLinuxTotem(), null);
jPanelLinux.add(getJbtLinuxKaffeine(), null);
jPanelLinux.add(getJbtLinuxAMSN(), null);
jPanelLinux.add(getJbtLinuxTuxPaint(), null);
jPanelLinux.add(getJbtLinuxLogo(), null);
jPanelLinux.add(getjbtLinuxDriveCD(), null);
jPanelLinux.add(getjbtLinuxDiscoC(), null);
jPanelLinux.add(getJbtLinuxDiscoD(), null);
}
return jPanelLinux;
}
private Component getjPanelMacintosh() {// **********Aba Macintosh
if (jPanelMacintosh == null) {
jPanelMacintosh = new JPanel();
jPanelMacintosh.setLayout(null);
jPanelMacintosh.setSize(new Dimension(695, 668));
// jPanelMacintosh.setBackground(Color.WHITE);
jPanelMacintosh.add(getJbtMacintoshLogo(), null);
}
return jPanelMacintosh;
}
private Component getjPanelSolaris() {// **********Aba Solaris
if (jPanelSolaris == null) {
jPanelSolaris = new JPanel();
jPanelSolaris.setLayout(null);
jPanelSolaris.setSize(new Dimension(695, 668));
jPanelSolaris.setBackground(Color.WHITE);
jPanelSolaris.add(getJbtSolarisLogo(), null);
}
return jPanelSolaris;
}
private Component getjPanelSymbian() {// **********Symbian
if (jPanelSymbian == null) {
jPanelSymbian = new JPanel();
jPanelSymbian.setSize(new Dimension(695, 668));
jPanelSymbian.setLayout(null);
jPanelSymbian.add(getJbtSymbianLogo(), null);
}
return jPanelSymbian;
}
private Component getjPanelIBM() {// **********Aba IBM
if (jPanelIBM == null) {
jPanelIBM = new JPanel();
jPanelIBM.setSize(new Dimension(695, 668));
// Cor de fundo azul
jPanelIBM.setBackground(new Color(0, 0, 205));
jPanelIBM.setLayout(null);
jPanelIBM.add(getJbtIBMLogo(), null);
}
return jPanelIBM;
}
private Component getjPanelAndroid() {// **********Aba Android
if (jPanelAndroid == null) {
jPanelAndroid = new JPanel();
jPanelAndroid.setLayout(null);
jPanelAndroid.setSize(new Dimension(695, 668));
jPanelAndroid.setBackground(Color.WHITE);
jPanelAndroid.add(getJbtAndroidLogo(), null);
}
return jPanelAndroid;
}
private Component getjPanelAmigaOS() {// **********Amiga Os
if (jPanelAmigaOS == null) {
jPanelAmigaOS = new JPanel();
jPanelAmigaOS.setLayout(null);
jPanelAmigaOS.setBackground(Color.WHITE);
jPanelAmigaOS.setSize(new Dimension(695, 668));
jPanelAmigaOS.add(getJbtAmigaOSLogo(), null);
}
return jPanelAmigaOS;
}
private Component getjPanelUnix() {// **********Unix
if (jPanelUnix == null) {
jPanelUnix = new JPanel();
jPanelUnix.setLayout(null);
// Cor de fundo azul
jPanelUnix.setBackground(new Color(25, 25, 112));
jPanelUnix.setSize(new Dimension(695, 668));
jPanelUnix.add(getJbtUnixLogo(), null);
}
return jPanelUnix;
}
private Component getjPanelIOS() {// **********IOS Apple
if (jPanelIOS == null) {
jPanelIOS = new JPanel();
jPanelIOS.setLayout(null);
jPanelIOS.setBackground(Color.WHITE);
jPanelIOS.setSize(new Dimension(695, 668));
jPanelIOS.add(getJbtIOSLogo(), null);
}
return jPanelIOS;
}
private Component getjPanelOpenBSD() {// **********OpenBSD
if (jPanelOpenBSD == null) {
jPanelOpenBSD = new JPanel();
jPanelOpenBSD.setLayout(null);
jPanelOpenBSD.setBackground(Color.WHITE);
jPanelOpenBSD.setSize(new Dimension(695, 668));
jPanelOpenBSD.add(getJbtOpenBSDLogo(), null);
}
return jPanelOpenBSD;
}
private Component getjPanelHaiku() {// **********Haiku
if (jPanelHaiku == null) {
jPanelHaiku = new JPanel();
jPanelHaiku.setLayout(null);
jPanelHaiku.setBackground(Color.WHITE);
jPanelHaiku.setSize(new Dimension(695, 668));
jPanelHaiku.add(getJbtHaikuLogo(), null);
}
return jPanelHaiku;
}
private Component getjPanelMinix() {// **********Minix
if (jPanelMinix == null) {
jPanelMinix = new JPanel();
jPanelMinix.setLayout(null);
jPanelMinix.setBackground(Color.WHITE);
jPanelMinix.setSize(new Dimension(695, 668));
jPanelMinix.add(getJbtMinixLogo(), null);
}
return jPanelMinix;
}
private Component getjPanelFreeBSD() {// **********FreeBSD
if (jPanelFreeBSD == null) {
jPanelFreeBSD = new JPanel();
jPanelFreeBSD.setLayout(null);
jPanelFreeBSD.setBackground(Color.WHITE);
jPanelFreeBSD.setSize(new Dimension(695, 668));
jPanelFreeBSD.add(getJbtFreeBSDLogo(), null);
}
return jPanelFreeBSD;
}
private Component getjPanelYouOS() {// **********YouOS
if (jPanelYouOS == null) {
jPanelYouOS = new JPanel();
jPanelYouOS.setLayout(null);
jPanelYouOS.setBackground(Color.WHITE);
jPanelYouOS.setSize(new Dimension(695, 668));
jPanelYouOS.add(getJbtYouOSLogo(), null);
}
return jPanelYouOS;
}
private Component getjPanelSistemaOperacional() {// **********Sistema
// Operacional
if (jPanelSistemaOperacional == null) {
jlbChecandoConexao = new JLabel();
jlbChecandoConexao.setBounds(new Rectangle(62, 374, 124,
26));
jlbChecandoConexao.setText(" Internet:");
jlbConexao = new JLabel();
jlbConexao.setBounds(new Rectangle(189, 374, 434, 24));
jlbPais = new JLabel();
jlbPais.setBounds(new Rectangle(62, 345, 124, 17));
jlbPais.setText("País:");
jlbLingua = new JLabel();
jlbLingua.setBounds(new Rectangle(62, 315, 124, 17));
jlbLingua.setText("Língua:");
jlbPaisUsuario = new JLabel();
jlbPaisUsuario.setBounds(new Rectangle(189, 344, 434, 17));
jlbPaisUsuario.setForeground(Color.BLUE);
jlbLinguaUsuario = new JLabel();
jlbLinguaUsuario.setBounds(new Rectangle(189, 315, 434, 17));
jlbLinguaUsuario.setForeground(Color.BLUE);
jlbSistema = new JLabel();
jlbSistema.setBounds(new Rectangle(189, 221, 434, 17));
jlbSistema.setForeground(Color.BLUE);
jlbSistemaOpreacional = new JLabel();
jlbSistemaOpreacional.setBounds(new Rectangle(62, 221, 124,
17));
jlbSistemaOpreacional.setText("Sistema Operacional:");
jlbVersaoDoSistema = new JLabel();
jlbVersaoDoSistema.setBounds(new Rectangle(62, 246, 124,
17));
jlbVersaoDoSistema.setText("Versão Do Sistema:");
jlbVersao = new JLabel();
jlbVersao.setBounds(new Rectangle(189, 246, 434, 17));
jlbVersao.setForeground(Color.BLUE);
jlbVersaoJava = new JLabel();
jlbVersaoJava.setBounds(new Rectangle(62, 268, 124, 17));
jlbVersaoJava.setText("Versão Do Java:");
jlbVersaoDoJava = new JLabel();
jlbVersaoDoJava.setBounds(new Rectangle(189, 268, 434, 17));
jlbVersaoDoJava.setForeground(Color.RED);
jlbUsuario = new JLabel();
jlbUsuario.setBounds(new Rectangle(62, 289, 124, 17));
jlbUsuario.setText("Nome do Usuário:");
jlbUsuarioNome = new JLabel();
jlbUsuarioNome.setBounds(new Rectangle(189, 289, 434, 17));
jlbUsuarioNome.setForeground(Color.BLUE);
jlbInformacaoDoSistema = new JLabel();
jlbInformacaoDoSistema.setBounds(new Rectangle(15, 12, 669,
46));
jlbInformacaoDoSistema
.setHorizontalAlignment(SwingConstants.CENTER);
jlbInformacaoDoSistema.setFont(new Font("Arial", Font.BOLD,
28));
jlbInformacaoDoSistema.setForeground(Color.BLUE);
jlbInformacaoDoSistema
.setText("Informações Do Sistema Operacional");
// ***************************************************
// Sistema Operacional do usuário
// System.out.println("Sistema Operacional: "+
// System.getProperty("os.name"));
jlbSistema.setText(System.getProperty("os.name"));
// Pega a versão do SO.
// System.out.println("Versão do Sistema: " +
// System.getProperty("os.version"));
jlbVersao.setText(System.getProperty("os.version"));
// Vesão do java.
// System.out.println("Versão do Java: "+
// System.getProperty("java.version"));
jlbVersaoDoJava.setText(System.getProperty("java.version"));
// Nome do usuário.
// System.out.println("Nome do Usuário: "+
// System.getProperty("user.name"));
jlbUsuarioNome.setText(System.getProperty("user.name"));
jlbPaisUsuario.setText(System.getProperty("user.country"));
jlbLinguaUsuario.setText(System.getProperty("user.language"));
//
//
//
//
//
//
Pasta do usuário.
System.out.println("Pasta do Usuário: " +
System.getProperty("user.home"));
Pasta onde o programa esta sendo executado.
System.out.println("Pasta do Programa: "+
System.getProperty("user.dir"));
jPanelSistemaOperacional = new JPanel();
jPanelSistemaOperacional.setLayout(null);
jPanelSistemaOperacional.setBackground(Color.WHITE);
jPanelSistemaOperacional.setSize(new Dimension(695, 668));
jPanelSistemaOperacional.add(jlbInformacaoDoSistema, null);
jPanelSistemaOperacional.add(jlbUsuarioNome, null);
jPanelSistemaOperacional.add(jlbUsuario, null);
jPanelSistemaOperacional.add(jlbVersaoDoJava, null);
jPanelSistemaOperacional.add(jlbVersaoJava, null);
jPanelSistemaOperacional.add(jlbVersao, null);
jPanelSistemaOperacional.add(jlbVersaoDoSistema, null);
jPanelSistemaOperacional.add(jlbSistemaOpreacional, null);
jPanelSistemaOperacional.add(jlbSistema, null);
jPanelSistemaOperacional.add(jlbLinguaUsuario, null);
jPanelSistemaOperacional.add(jlbPaisUsuario, null);
jPanelSistemaOperacional.add(jlbLingua, null);
jPanelSistemaOperacional.add(jlbPais, null);
jPanelSistemaOperacional.add(jlbConexao, null);
jPanelSistemaOperacional.add(jlbChecandoConexao, null);
}
return jPanelSistemaOperacional;
}
// *****************************Começo dos componentes da aba Windows
private JButton getJbtWindowsCalculadora() {
if (jbtWindowsCalculadora == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Calculadora.png"));
jbtWindowsCalculadora = new JButton(icone);
jbtWindowsCalculadora.setBounds(new Rectangle(50, -6, 90,
90));
jbtWindowsCalculadora.setContentAreaFilled(false);
jbtWindowsCalculadora.setBorderPainted(false);
jbtWindowsCalculadora.setToolTipText("Calculadora");
jbtWindowsCalculadora.setCursor(new
Cursor(Cursor.HAND_CURSOR));
jbtWindowsCalculadora.addKeyListener(this);
jbtWindowsCalculadora.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime().exec("calc");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsCalculadora;
}
private JButton getJbtWindowsNotepad() {
if (jbtWindowsNotepad == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Notepad.png"));
jbtWindowsNotepad = new JButton(icone);
jbtWindowsNotepad.setBounds(new Rectangle(50, 59, 90, 90));
jbtWindowsNotepad.setContentAreaFilled(false);
jbtWindowsNotepad.setBorderPainted(false);
jbtWindowsNotepad.setToolTipText("Bloco De Notas");
jbtWindowsNotepad.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsNotepad.addKeyListener(this);
jbtWindowsNotepad.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime().exec(
"cmd.exe /c start notepad.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsNotepad;
}
private JButton getJbtLinuxFirefox() {
if (jbtLinuxFirefox == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Mozilla.png"));
jbtLinuxFirefox = new JButton(icone);
jbtLinuxFirefox.setContentAreaFilled(false);
jbtLinuxFirefox.setBorderPainted(false);
jbtLinuxFirefox.setToolTipText("Firefox");
jbtLinuxFirefox.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtLinuxFirefox.setBounds(new Rectangle(58, -6, 90, 90));
jbtLinuxFirefox.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec("firefox");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Você não estar no Linux! \nSeu sistema
operacional é: \n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtLinuxFirefox;
}
private JButton getJbtWindowsFirefox() {
if (jbtWindowsFirefox == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Mozilla.png"));
jbtWindowsFirefox = new JButton(icone);
jbtWindowsFirefox.setContentAreaFilled(false);
jbtWindowsFirefox.setBorderPainted(false);
jbtWindowsFirefox.setToolTipText("Firefox");
jbtWindowsFirefox.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsFirefox.setBounds(new Rectangle(108, 59, 90, 90));
jbtWindowsFirefox.addKeyListener(this);
jbtWindowsFirefox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime().exec(
"cmd.exe /c start Firefox.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsFirefox;
}
private JButton getJbtWindowsLogo() {
if (jbtWindowsLogo == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/WindowsLogo.png"));
jbtWindowsLogo = new JButton(icone);
jbtWindowsLogo.setContentAreaFilled(false);
jbtWindowsLogo.setBorderPainted(false);
jbtWindowsLogo.setFocusPainted(false);// Tira o fucus do
botão
jbtWindowsLogo.setToolTipText("Windows");
jbtWindowsLogo.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsLogo.setBounds(new Rectangle(226, 99, 310, 300));
jbtWindowsLogo.addKeyListener(this);
jbtWindowsLogo.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime()
.exec("cmd.exe /c start winver.exe");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Seu sistema operacional não é Windows é
\n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtWindowsLogo;
}
private JButton getJbtLinuxLogo() {
if (jbtLinuxLogo == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/LinuxLogo.png"));
jbtLinuxLogo = new JButton(icone);
jbtLinuxLogo.setContentAreaFilled(false);
jbtLinuxLogo.setBorderPainted(false);
jbtLinuxLogo.setFocusPainted(false);// Tira o fucus do botão
jbtLinuxLogo.setToolTipText("Linux");
jbtLinuxLogo.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtLinuxLogo.setBounds(new Rectangle(226, 99, 300, 360));
jbtLinuxLogo.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec("terminal");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Seu sistema operacional não é Linux é
\n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtLinuxLogo;
}
private JButton getJbtWindowsExplore() {
if (jbtWindowsExplore == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Explore.png"));
jbtWindowsExplore = new JButton(icone);
jbtWindowsExplore.setContentAreaFilled(false);
jbtWindowsExplore.setBorderPainted(false);
jbtWindowsExplore.setToolTipText("Explore");
jbtWindowsExplore.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsExplore.setBounds(new Rectangle(108, -6, 90, 90));
jbtWindowsExplore.addKeyListener(this);
jbtWindowsExplore.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime().exec(
"cmd.exe /c start iexplore.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsExplore;
}
private JButton getjbtWindowsOpera() {
if (jbtWindowsOpera == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Opera.png"));
jbtWindowsOpera = new JButton(icone);
jbtWindowsOpera.setContentAreaFilled(false);
jbtWindowsOpera.setBorderPainted(false);
jbtWindowsOpera.setToolTipText("Opera");
jbtWindowsOpera.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsOpera.setBounds(new Rectangle(108, 179, 90, 90));
jbtWindowsOpera.addKeyListener(this);
jbtWindowsOpera.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
opera.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsOpera;
}
private JButton getjbtWindowsChrome() {
if (jbtWindowsChrome == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Chrome.png"));
jbtWindowsChrome = new JButton(icone);
jbtWindowsChrome.setContentAreaFilled(false);
jbtWindowsChrome.setBorderPainted(false);
jbtWindowsChrome.setToolTipText("Google Chrome");
jbtWindowsChrome.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsChrome.setBounds(new Rectangle(108, 124, 90, 90));
jbtWindowsChrome.addKeyListener(this);
jbtWindowsChrome.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime()
.exec("cmd.exe /c start chrome.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsChrome;
}
private JButton getJbtWindowsSafari() {
if (jbtWindowsSafari == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Safari.png"));
jbtWindowsSafari = new JButton(icone);
jbtWindowsSafari.setContentAreaFilled(false);
jbtWindowsSafari.setBorderPainted(false);
jbtWindowsSafari.setToolTipText("Safari");
jbtWindowsSafari.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsSafari.setBounds(new Rectangle(108, 238, 90, 90));
jbtWindowsSafari.addKeyListener(this);
jbtWindowsSafari.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime()
.exec("cmd.exe /c start safari.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsSafari;
}
private JButton getJbtWindowsNetscape() {
if (jbtWindowsNetscape == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Netscape.png"));
jbtWindowsNetscape = new JButton(icone);
jbtWindowsNetscape.setContentAreaFilled(false);
jbtWindowsNetscape.setBorderPainted(false);
jbtWindowsNetscape.setToolTipText("Netscape");
jbtWindowsNetscape.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsNetscape.setBounds(new Rectangle(108, 300, 90,
90));
jbtWindowsNetscape.addKeyListener(this);
jbtWindowsNetscape.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime().exec(
"cmd.exe /c start netscape.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsNetscape;
}
private JButton getjbtWindowsMediaPlayer() {
if (jbtWindowsMediaPlayer == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/MediaPlayer.png"));
jbtWindowsMediaPlayer = new JButton(icone);
jbtWindowsMediaPlayer.setContentAreaFilled(false);
jbtWindowsMediaPlayer.setBorderPainted(false);
jbtWindowsMediaPlayer.setToolTipText("Media Player");
jbtWindowsMediaPlayer.setCursor(new
Cursor(Cursor.HAND_CURSOR));
jbtWindowsMediaPlayer.setBounds(new Rectangle(631, 300, 90,
90));
jbtWindowsMediaPlayer.addKeyListener(this);
jbtWindowsMediaPlayer.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime().exec(
"cmd.exe /c start wmplayer.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsMediaPlayer;
}
private JButton getjbtWindowsRealPlayer() {
if (jbtWindowsRealPlayer == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/RealPlayer.png"));
jbtWindowsRealPlayer = new JButton(icone);
jbtWindowsRealPlayer.setContentAreaFilled(false);
jbtWindowsRealPlayer.setBorderPainted(false);
jbtWindowsRealPlayer.setToolTipText("Real Player");
jbtWindowsRealPlayer.setCursor(new
Cursor(Cursor.HAND_CURSOR));
jbtWindowsRealPlayer.setBounds(new Rectangle(631, 363, 90,
90));
jbtWindowsRealPlayer.addKeyListener(this);
jbtWindowsRealPlayer.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime().exec(
"cmd.exe /c start realplay.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsRealPlayer;
}
private JButton getJbtWindowsOutLook() {
if (jbtWindowsOutLook == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Outlook.png"));
jbtWindowsOutLook = new JButton(icone);
jbtWindowsOutLook.setContentAreaFilled(false);
jbtWindowsOutLook.setBorderPainted(false);
jbtWindowsOutLook.setToolTipText("Outlook");
jbtWindowsOutLook.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsOutLook.setBounds(new Rectangle(50, 300, 90, 90));
jbtWindowsOutLook.addKeyListener(this);
jbtWindowsOutLook.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
msimn.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsOutLook;
}
private JButton getJbtWindowsPowerpoint() {
if (jbtWindowsPowerpoint == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Powerpoint.png"));
jbtWindowsPowerpoint = new JButton(icone);
jbtWindowsPowerpoint.setContentAreaFilled(false);
jbtWindowsPowerpoint.setBorderPainted(false);
jbtWindowsPowerpoint.setToolTipText("Powerpoint");
jbtWindowsPowerpoint.setCursor(new
Cursor(Cursor.HAND_CURSOR));
jbtWindowsPowerpoint.setBounds(new Rectangle(50, 238, 90,
90));
jbtWindowsPowerpoint.addKeyListener(this);
jbtWindowsPowerpoint.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime().exec(
"cmd.exe /c start powerpnt.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsPowerpoint;
}
private JButton getJbtWindowsExcel() {
if (jbtWindowsExcel == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Excel.png"));
jbtWindowsExcel = new JButton(icone);
jbtWindowsExcel.setContentAreaFilled(false);
jbtWindowsExcel.setBorderPainted(false);
jbtWindowsExcel.setToolTipText("Excel");
jbtWindowsExcel.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsExcel.setBounds(new Rectangle(50, 179, 90, 90));
jbtWindowsExcel.addKeyListener(this);
jbtWindowsExcel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
excel.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsExcel;
}
private JButton getJbtWindowsWord() {
if (jbtWindowsWord == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Word.png"));
jbtWindowsWord = new JButton(icone);
jbtWindowsWord.setContentAreaFilled(false);
jbtWindowsWord.setBorderPainted(false);
jbtWindowsWord.setToolTipText("Word");
jbtWindowsWord.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsWord.setBounds(new Rectangle(50, 124, 90, 90));
jbtWindowsWord.addKeyListener(this);
jbtWindowsWord.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime().exec(
"cmd.exe /c start winword.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsWord;
}
private JButton getJbtWindowsPaint() {
if (jbtWindowsPaint == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Paint.png"));
jbtWindowsPaint = new JButton(icone);
jbtWindowsPaint.setContentAreaFilled(false);
jbtWindowsPaint.setBorderPainted(false);
jbtWindowsPaint.setToolTipText("Paint");
jbtWindowsPaint.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsPaint.setBounds(new Rectangle(50, 363, 90, 90));
jbtWindowsPaint.addKeyListener(this);
jbtWindowsPaint.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime().exec(
"cmd.exe /c start mspaint.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsPaint;
}
private JButton getJbtWindowsLimparDisco() {
if (jbtWindowsLimparDisco == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/LimparDisco.png"));
jbtWindowsLimparDisco = new JButton(icone);
jbtWindowsLimparDisco.setContentAreaFilled(false);
jbtWindowsLimparDisco.setBorderPainted(false);
jbtWindowsLimparDisco.setToolTipText("Limpar Disco");
jbtWindowsLimparDisco.setCursor(new
Cursor(Cursor.HAND_CURSOR));
jbtWindowsLimparDisco.setBounds(new Rectangle(699, 59, 90,
90));
jbtWindowsLimparDisco.addKeyListener(this);
jbtWindowsLimparDisco.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime().exec(
"cmd.exe /c start cleanmgr.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsLimparDisco;
}
private JButton getJbtWindowsTecladoVirtual() {
if (jbtWindowsTecladoVirtual == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Teclado.png"));
jbtWindowsTecladoVirtual = new JButton(icone);
jbtWindowsTecladoVirtual.setContentAreaFilled(false);
jbtWindowsTecladoVirtual.setBorderPainted(false);
jbtWindowsTecladoVirtual.setToolTipText("Teclado Virtual");
jbtWindowsTecladoVirtual.setCursor(new
Cursor(Cursor.HAND_CURSOR));
jbtWindowsTecladoVirtual.setBounds(new Rectangle(699, 124,
90, 90));
jbtWindowsTecladoVirtual.addKeyListener(this);
jbtWindowsTecladoVirtual.addActionListener(new
ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
Osk.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsTecladoVirtual;
}
private JButton getJbtWindowsMSN() {
if (jbtWindowsMSN == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/MSN.png"));
jbtWindowsMSN = new JButton(icone);
jbtWindowsMSN.setContentAreaFilled(false);
jbtWindowsMSN.setBorderPainted(false);
jbtWindowsMSN.setToolTipText("MSN");
jbtWindowsMSN.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsMSN.setBounds(new Rectangle(631, 59, 90, 90));
jbtWindowsMSN.addKeyListener(this);
jbtWindowsMSN.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime().exec(
"cmd.exe /c start msnmsgr.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsMSN;
}
private JButton getJbtWindowsPaciencia() {
if (jbtWindowsPaciencia == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Paciencia.png"));
jbtWindowsPaciencia = new JButton(icone);
jbtWindowsPaciencia.setContentAreaFilled(false);
jbtWindowsPaciencia.setBorderPainted(false);
jbtWindowsPaciencia.setToolTipText("Paciência");
jbtWindowsPaciencia.setCursor(new
Cursor(Cursor.HAND_CURSOR));
jbtWindowsPaciencia.setBounds(new Rectangle(699, 238, 90,
90));
jbtWindowsPaciencia.addKeyListener(this);
jbtWindowsPaciencia.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
Sol.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsPaciencia;
}
private JButton getJbtWindowsSpider() {
if (jbtWindowsSpider == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Spider.png"));
jbtWindowsSpider = new JButton(icone);
jbtWindowsSpider.setContentAreaFilled(false);
jbtWindowsSpider.setBorderPainted(false);
jbtWindowsSpider.setToolTipText("Spider");
jbtWindowsSpider.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsSpider.setBounds(new Rectangle(699, 179, 90, 90));
jbtWindowsSpider.addKeyListener(this);
jbtWindowsSpider.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime()
.exec("cmd.exe /c start spider.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsSpider;
}
private JButton getjbtWindowsOrkut() {
if (jbtWindowsOrkut == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Orkut.png"));
jbtWindowsOrkut = new JButton(icone);
jbtWindowsOrkut.setContentAreaFilled(false);
jbtWindowsOrkut.setBorderPainted(false);
jbtWindowsOrkut.setToolTipText("Orkut");
jbtWindowsOrkut.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsOrkut.setBounds(new Rectangle(560, 59, 90, 90));
jbtWindowsOrkut.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
BareBonesBrowserLaunch.openURL("http://www.orkut.com.br");
}
});
}
return jbtWindowsOrkut;
}
private JButton getJbtWindowsFacebook() {
if (jbtWindowsFacebook == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Facebook.png"));
jbtWindowsFacebook = new JButton(icone);
jbtWindowsFacebook.setBounds(new Rectangle(560, -6, 90, 90));
jbtWindowsFacebook.setContentAreaFilled(false);
jbtWindowsFacebook.setBorderPainted(false);
jbtWindowsFacebook.setToolTipText("Facebook");
jbtWindowsFacebook.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsFacebook
.addMouseListener(new java.awt.event.MouseAdapter() {
public void
mouseClicked(java.awt.event.MouseEvent e) {
BareBonesBrowserLaunch
.openURL("http://www.facebook.com");
}
});
}
return jbtWindowsFacebook;
}
private JButton getJbtWindowsYoutube() {
if (jbtWindowsYoutube == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Youtube.png"));
jbtWindowsYoutube = new JButton(icone);
jbtWindowsYoutube.setBounds(new Rectangle(631, -6, 90, 90));
jbtWindowsYoutube.setContentAreaFilled(false);
jbtWindowsYoutube.setBorderPainted(false);
jbtWindowsYoutube.setToolTipText("Youtube");
jbtWindowsYoutube.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsYoutube
.addMouseListener(new java.awt.event.MouseAdapter() {
public void
mouseClicked(java.awt.event.MouseEvent e) {
BareBonesBrowserLaunch
.openURL("http://www.youtube.com.br");
}
});
}
return jbtWindowsYoutube;
}
private JButton getJbtWindowsMyspace() {
if (jbtWindowsMyspace == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Myspace.png"));
jbtWindowsMyspace = new JButton(icone);
jbtWindowsMyspace.setBounds(new Rectangle(560, 124, 90, 90));
jbtWindowsMyspace.setContentAreaFilled(false);
jbtWindowsMyspace.setBorderPainted(false);
jbtWindowsMyspace.setToolTipText("Myspace");
jbtWindowsMyspace.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsMyspace
.addMouseListener(new java.awt.event.MouseAdapter() {
public void
mouseClicked(java.awt.event.MouseEvent e) {
BareBonesBrowserLaunch
.openURL("http://www.myspace.com");
}
});
}
return jbtWindowsMyspace;
}
private JButton getJbtWindowsTwitter() {
if (jbtWindowsTwitter == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Twitter.png"));
jbtWindowsTwitter = new JButton(icone);
jbtWindowsTwitter.setBounds(new Rectangle(560, 179, 90, 90));
jbtWindowsTwitter.setContentAreaFilled(false);
jbtWindowsTwitter.setBorderPainted(false);
jbtWindowsTwitter.setToolTipText("Twitter");
jbtWindowsTwitter.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsTwitter
.addMouseListener(new java.awt.event.MouseAdapter() {
public void
mouseClicked(java.awt.event.MouseEvent e) {
BareBonesBrowserLaunch
.openURL("http://twitter.com");
}
});
}
return jbtWindowsTwitter;
}
private JButton getJbtWindowsLinkedIn() {
if (jbtWindowsLinkedIn == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/LinkedIn.png"));
jbtWindowsLinkedIn = new JButton(icone);
jbtWindowsLinkedIn.setBounds(new Rectangle(560, 300, 90,
90));
jbtWindowsLinkedIn.setContentAreaFilled(false);
jbtWindowsLinkedIn.setBorderPainted(false);
jbtWindowsLinkedIn.setToolTipText("LinkedIn");
jbtWindowsLinkedIn.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsLinkedIn
.addMouseListener(new java.awt.event.MouseAdapter() {
public void
mouseClicked(java.awt.event.MouseEvent e) {
BareBonesBrowserLaunch
.openURL("http://www.linkedin.com");
}
});
}
return jbtWindowsLinkedIn;
}
private JButton getJbtWindowsFlickr() {
if (jbtWindowsFlickr == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Flickr.png"));
jbtWindowsFlickr = new JButton(icone);
jbtWindowsFlickr.setBounds(new Rectangle(560, 363, 90, 90));
jbtWindowsFlickr.setContentAreaFilled(false);
jbtWindowsFlickr.setBorderPainted(false);
jbtWindowsFlickr.setToolTipText("Flickr");
jbtWindowsFlickr.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsFlickr
.addMouseListener(new java.awt.event.MouseAdapter() {
public void
mouseClicked(java.awt.event.MouseEvent e) {
BareBonesBrowserLaunch
.openURL("http://www.flickr.com");
}
});
}
return jbtWindowsFlickr;
}
private JButton getJbtWindowsBlogger() {
if (jbtWindowsBlogger == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Blogger.png"));
jbtWindowsBlogger = new JButton(icone);
jbtWindowsBlogger.setBounds(new Rectangle(560, 238, 90, 90));
jbtWindowsBlogger.setContentAreaFilled(false);
jbtWindowsBlogger.setBorderPainted(false);
jbtWindowsBlogger.setToolTipText("Blogger");
jbtWindowsBlogger.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsBlogger
.addMouseListener(new java.awt.event.MouseAdapter() {
public void
mouseClicked(java.awt.event.MouseEvent e) {
BareBonesBrowserLaunch
.openURL("http://www.blogger.com");
}
});
}
return jbtWindowsBlogger;
}
private JButton getJbtWindowsSkype() {
if (jbtWindowsSkype == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Skype.png"));
jbtWindowsSkype = new JButton(icone);
jbtWindowsSkype.setBounds(new Rectangle(631, 124, 90, 90));
jbtWindowsSkype.setContentAreaFilled(false);
jbtWindowsSkype.setBorderPainted(false);
jbtWindowsSkype.setToolTipText("Skype");
jbtWindowsSkype.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsSkype.addKeyListener(this);
jbtWindowsSkype.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
skype.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsSkype;
}
private JButton getJbtWindowsIp() {
if (jbtWindowsIp == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Ipconfig.png"));
jbtWindowsIp = new JButton(icone);
jbtWindowsIp.setToolTipText("Ipconfig");
jbtWindowsIp.setContentAreaFilled(false);
jbtWindowsIp.setBorderPainted(false);
jbtWindowsIp.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsIp.setBounds(new Rectangle(699, 300, 90, 90));
jbtWindowsIp.addKeyListener(this);
jbtWindowsIp.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
InetAddress localaddr =
InetAddress.getLocalHost();
JOptionPane.showMessageDialog(
null,
"Endereço de IP : "
+ localaddr.getHostAddress()
+ "\nNome da máquina : "
+ localaddr.getHostName()
+ JOptionPane.PLAIN_MESSAGE);
} catch (UnknownHostException ea) {
JOptionPane.showMessageDialog(null,
"Não foi possivel localizar o IP : " + e
+ JOptionPane.PLAIN_MESSAGE);
}
}
});
}
return jbtWindowsIp;
}
private JButton getJbtWindowsPowerDVD() {
if (jbtWindowsPowerDVD == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/PowerDVD.png"));
jbtWindowsPowerDVD = new JButton(icone);
jbtWindowsPowerDVD.setContentAreaFilled(false);
jbtWindowsPowerDVD.setBorderPainted(false);
jbtWindowsPowerDVD.setToolTipText("PowerDVD");
jbtWindowsPowerDVD.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsPowerDVD.setBounds(new Rectangle(631, 179, 90,
90));
jbtWindowsPowerDVD.addKeyListener(this);
jbtWindowsPowerDVD.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime().exec(
"cmd.exe /c start PowerDVD.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsPowerDVD;
}
private JButton getJbtWindowsNero() {
if (jbtWindowsNero == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Nero.png"));
jbtWindowsNero = new JButton(icone);
jbtWindowsNero.setContentAreaFilled(false);
jbtWindowsNero.setBorderPainted(false);
jbtWindowsNero.setToolTipText("Nero");
jbtWindowsNero.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsNero.setBounds(new Rectangle(631, 238, 90, 90));
jbtWindowsNero.addKeyListener(this);
jbtWindowsNero.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
nero.exe");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsNero;
}
private JButton getJbtWindowsEbuddy() {
if (jbtWindowsEbuddy == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Ebuddy.png"));
jbtWindowsEbuddy = new JButton(icone);
jbtWindowsEbuddy.setContentAreaFilled(false);
jbtWindowsEbuddy.setBorderPainted(false);
jbtWindowsEbuddy.setToolTipText("Ebuddy");
jbtWindowsEbuddy.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsEbuddy.setBounds(new Rectangle(108, 363, 90, 90));
jbtWindowsEbuddy.addKeyListener(this);
jbtWindowsEbuddy.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
BareBonesBrowserLaunch.openURL("http://web.ebuddy.com");
}
});
}
return jbtWindowsEbuddy;
}
private JButton getjbtWindowsAbrirCD() {
if (jbtWindowsAbrirCD == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/CD.png"));
jbtWindowsAbrirCD = new JButton(icone);
jbtWindowsAbrirCD.setBounds(new Rectangle(699, -6, 90, 90));
jbtWindowsAbrirCD.setToolTipText("Abrir CD");
jbtWindowsAbrirCD.setContentAreaFilled(false);
jbtWindowsAbrirCD.setBorderPainted(false);
jbtWindowsAbrirCD.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsAbrirCD
.addMouseListener(new java.awt.event.MouseAdapter() {
public void
mouseClicked(java.awt.event.MouseEvent e) {
EjectDrive je = new EjectDrive();
for (String drv : je.getDrivers()) {
System.out
.println("Unidade encontrada: " +
drv);
je.eject(drv, "Deseja fechar a gaveta?",
"CD/DVD");
}
}
});
}
return jbtWindowsAbrirCD;
}
private JButton getjbtWindowsDiscoC() {
if (jbtWindowsDiscoC == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/PastaC.png"));
jbtWindowsDiscoC = new JButton(icone);
jbtWindowsDiscoC.setBounds(new Rectangle(-12, 299, 90, 90));
jbtWindowsDiscoC.setToolTipText("Abrir Disco C");
jbtWindowsDiscoC.setContentAreaFilled(false);
jbtWindowsDiscoC.setBorderPainted(false);
jbtWindowsDiscoC.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsDiscoC.addKeyListener(this);
jbtWindowsDiscoC.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
AbrirDiretorios.AbrirC();
}
});
}
return jbtWindowsDiscoC;
}
private JButton getjbtWindowsDiscoD() {
if (jbtWindowsDiscoD == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/PastaD.png"));
jbtWindowsDiscoD = new JButton(icone);
jbtWindowsDiscoD.setBounds(new Rectangle(-12, 359, 90, 90));
jbtWindowsDiscoD.setToolTipText("Abrir Disco D");
jbtWindowsDiscoD.setContentAreaFilled(false);
jbtWindowsDiscoD.setBorderPainted(false);
jbtWindowsDiscoD.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsDiscoD.addKeyListener(this);
jbtWindowsDiscoD.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
AbrirDiretorios.AbrirD();
}
});
}
return jbtWindowsDiscoD;
}
private JButton getjbtWindowsMeusDocumentos() {
if (jbtWindowsMeusDocumentos == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/MeusDocumentos.png"));
jbtWindowsMeusDocumentos = new JButton(icone);
jbtWindowsMeusDocumentos.setToolTipText("Meus documentos");
jbtWindowsMeusDocumentos.setContentAreaFilled(false);
jbtWindowsMeusDocumentos.setBorderPainted(false);
jbtWindowsMeusDocumentos.setCursor(new
Cursor(Cursor.HAND_CURSOR));
jbtWindowsMeusDocumentos.setBounds(new Rectangle(-12, 59, 90,
90));
jbtWindowsMeusDocumentos.addKeyListener(this);
jbtWindowsMeusDocumentos.addActionListener(new
ActionListener() {
public void actionPerformed(ActionEvent e) {
AbrirDiretorios.AbrirMeusDocumentos();
}
});
}
return jbtWindowsMeusDocumentos;
}
private JButton getjbtWindowsMinhasImagens() {
if (jbtWindowsMinhasImagens == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/MinhasImagens.png"));
jbtWindowsMinhasImagens = new JButton(icone);
jbtWindowsMinhasImagens.setBounds(new Rectangle(-12, 124, 90,
90));
jbtWindowsMinhasImagens.setToolTipText("Minhas Imagens");
jbtWindowsMinhasImagens.setContentAreaFilled(false);
jbtWindowsMinhasImagens.setBorderPainted(false);
jbtWindowsMinhasImagens.setCursor(new
Cursor(Cursor.HAND_CURSOR));
jbtWindowsMinhasImagens.addKeyListener(this);
jbtWindowsMinhasImagens.addActionListener(new
ActionListener() {
public void actionPerformed(ActionEvent e) {
AbrirDiretorios.AbrirMinhasImagens();
}
});
}
return jbtWindowsMinhasImagens;
}
private JButton getjbtWindowsMinhasMusicas() {
if (jbtWindowsMinhasMusicas == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/MinhasMusicas.png"));
jbtWindowsMinhasMusicas = new JButton(icone);
jbtWindowsMinhasMusicas.setBounds(new Rectangle(-12, 179, 90,
90));
jbtWindowsMinhasMusicas.setToolTipText("Minhas Músicas");
jbtWindowsMinhasMusicas.setContentAreaFilled(false);
jbtWindowsMinhasMusicas.setBorderPainted(false);
jbtWindowsMinhasMusicas.setCursor(new
Cursor(Cursor.HAND_CURSOR));
jbtWindowsMinhasMusicas.addKeyListener(this);
jbtWindowsMinhasMusicas.addActionListener(new
ActionListener() {
public void actionPerformed(ActionEvent e) {
AbrirDiretorios.AbrirMinhasMusicas();
}
});
}
return jbtWindowsMinhasMusicas;
}
private JButton getjbtWindowsMeusVideos() {
if (jbtWindowsMeusVideos == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/MeusVideos.png"));
jbtWindowsMeusVideos = new JButton(icone);
jbtWindowsMeusVideos.setBounds(new Rectangle(-12, 238, 90,
90));
jbtWindowsMeusVideos.setToolTipText("Minhas Videos");
jbtWindowsMeusVideos.setContentAreaFilled(false);
jbtWindowsMeusVideos.setBorderPainted(false);
jbtWindowsMeusVideos.setCursor(new
Cursor(Cursor.HAND_CURSOR));
jbtWindowsMeusVideos.addKeyListener(this);
jbtWindowsMeusVideos.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
AbrirDiretorios.AbrirMeusVideos();
}
});
}
return jbtWindowsMeusVideos;
}
private JButton getjbtWindowsMeuComputador() {
if (jbtWindowsMeuComputador == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Computador.png"));
jbtWindowsMeuComputador = new JButton(icone);
jbtWindowsMeuComputador.setBounds(new Rectangle(-12, -6, 90,
90));
jbtWindowsMeuComputador.setToolTipText("Meu Computador");
jbtWindowsMeuComputador.setContentAreaFilled(false);
jbtWindowsMeuComputador.setBorderPainted(false);
jbtWindowsMeuComputador.setCursor(new
Cursor(Cursor.HAND_CURSOR));
jbtWindowsMeuComputador.addKeyListener(this);
jbtWindowsMeuComputador.addActionListener(new
ActionListener() {
public void actionPerformed(ActionEvent e) {
AbrirDiretorios.AbrirMeuComputador();
}
});
}
return jbtWindowsMeuComputador;
}
private JButton getJbtWindowsRelogio() {
if (jbtWindowsRelogio == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Ampulheta.png"));
jbtWindowsRelogio = new JButton(icone);
jbtWindowsRelogio.setContentAreaFilled(false);
jbtWindowsRelogio.setBorderPainted(false);
jbtWindowsRelogio.setToolTipText("Relógio");
jbtWindowsRelogio.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsRelogio.addKeyListener(this);
jbtWindowsRelogio.setBounds(new Rectangle(699, 370, 90, 90));
jbtWindowsRelogio.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Runtime.getRuntime().exec(
"cmd.exe /c start timedate.cpl");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsRelogio;
}
private JButton getJbtWindowsLixeira() {
if (jbtWindowsLixeira == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Lixeira.png"));
jbtWindowsLixeira = new JButton(icone);
jbtWindowsLixeira.setContentAreaFilled(false);
jbtWindowsLixeira.setBorderPainted(false);
jbtWindowsLixeira.setToolTipText("Lixeira");
jbtWindowsLixeira.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindowsLixeira.addKeyListener(this);
jbtWindowsLixeira.setBounds(new Rectangle(-12, 429, 90, 90));
jbtWindowsLixeira
.addMouseListener(new java.awt.event.MouseAdapter() {
public void
mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec(
"explorer.exe
shell:RecycleBinFolder");
} catch (IOException ea) {
}
}
});
}
return jbtWindowsLixeira;
}
private JButton getjbtWindowsPhotoshop() {
if (jbtWindowsPhotoshop == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Photoshop.png"));
jbtWindowsPhotoshop = new JButton(icone);
jbtWindowsPhotoshop.setToolTipText("Photoshop");
jbtWindowsPhotoshop.setContentAreaFilled(false);
jbtWindowsPhotoshop.setBorderPainted(false);
jbtWindowsPhotoshop.addKeyListener(this);
jbtWindowsPhotoshop.setCursor(new
Cursor(Cursor.HAND_CURSOR));
jbtWindowsPhotoshop.setBounds(new Rectangle(50, 429, 90,
90));
jbtWindowsPhotoshop
.addMouseListener(new java.awt.event.MouseAdapter() {
public void
mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec(
"cmd.exe /c start
Photoshop.exe");
} catch (Exception e2) {
}
}
});
}
return jbtWindowsPhotoshop;
}
// ***********************FIM dos componentes da aba Windows
private JButton getJbtMacintoshLogo() {
if (jbtMacintoshLogo == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/MacOSLogo.png"));
jbtMacintoshLogo = new JButton(icone);
jbtMacintoshLogo.setContentAreaFilled(false);
jbtMacintoshLogo.setBorderPainted(false);
jbtMacintoshLogo.setToolTipText("Mac OS");
jbtMacintoshLogo.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtMacintoshLogo.setBounds(new Rectangle(192, 158, 300,
214));
jbtMacintoshLogo
.addMouseListener(new java.awt.event.MouseAdapter() {
public void
mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec("macintosh");
} catch (IOException ea) {
JOptionPane
.showMessageDialog(
null,
"Seu sistema operacional
não é Mac OS é \n"
+
System.getProperty("os.name"));
}
}
});
}
return jbtMacintoshLogo;
}
private JButton getJbtSolarisLogo() {
if (jbtSolarisLogo == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/SolarisLogo.png"));
jbtSolarisLogo = new JButton(icone);
jbtSolarisLogo.setContentAreaFilled(false);
jbtSolarisLogo.setBorderPainted(false);
jbtSolarisLogo.setToolTipText("Solaris");
jbtSolarisLogo.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtSolarisLogo.setBounds(new Rectangle(226, 99, 300, 157));
jbtSolarisLogo.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec("solaris");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Seu sistema operacional não é Solaris é
\n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtSolarisLogo;
}
private JButton getJbtSymbianLogo() {
if (jbtSymbianLogo == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/SymbianLogo.png"));
jbtSymbianLogo = new JButton(icone);
jbtSymbianLogo.setContentAreaFilled(false);
jbtSymbianLogo.setBorderPainted(false);
jbtSymbianLogo.setFocusPainted(false);// Tira o fucus do
botão
jbtSymbianLogo.setToolTipText("Symbian");
jbtSymbianLogo.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtSymbianLogo.setBounds(new Rectangle(171, 183, 340, 150));
jbtSymbianLogo.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec("symbian");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Seu sistema operacional não é Symbian é
\n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtSymbianLogo;
}
private JButton getJbtIBMLogo() {
if (jbtIBMLogo == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/IBMLogo.png"));
jbtIBMLogo = new JButton(icone);
jbtIBMLogo.setContentAreaFilled(false);
jbtIBMLogo.setBorderPainted(false);
jbtIBMLogo.setToolTipText("IBM OS/2");
jbtIBMLogo.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtIBMLogo.setBounds(new Rectangle(202, 171, 300, 175));
jbtIBMLogo.addMouseListener(new java.awt.event.MouseAdapter()
{
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec("ibm");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Seu sistema operacional não é IBM OS/2 é
\n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtIBMLogo;
}
private JButton getJbtAndroidLogo() {
if (jbtAndroidLogo == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/AndroidLogo.png"));
jbtAndroidLogo = new JButton(icone);
jbtAndroidLogo.setContentAreaFilled(false);
jbtAndroidLogo.setBorderPainted(false);
jbtAndroidLogo.setToolTipText("Android");
jbtAndroidLogo.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtAndroidLogo.setBounds(new Rectangle(226, 99, 300, 355));
jbtAndroidLogo.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec("android");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Seu sistema operacional não é Android é
\n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtAndroidLogo;
}
private JButton getJbtSobre() {
if (jbtSobre == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Brasil.png"));
jbtSobre = new JButton(icone);
jbtSobre.setContentAreaFilled(false);
jbtSobre.setBorderPainted(false);
jbtSobre.setFocusPainted(false);// Tira o fucus do botão
jbtSobre.setToolTipText("Sobre");
jbtSobre.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtSobre.setBounds(new Rectangle(5, 1, 61, 52));
jbtSobre.addKeyListener(this);
jbtSobre.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane.showMessageDialog(null,
"Desenvolvido por: J. Marcos B. "
+ "\n Visite nosso blog: "
+ "\n
http://isjavado.wordpress.com/",
"Grenciador De Aplicativos",
JOptionPane.INFORMATION_MESSAGE);
}
});
}
return jbtSobre;
}
private JButton getjbtInformacao() {
if (jbtInformacao == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Informacao.png"));
jbtInformacao = new JButton(icone);
jbtInformacao.setContentAreaFilled(false);
jbtInformacao.setBorderPainted(false);
jbtInformacao.setFocusPainted(false);// Tira o fucus do botão
jbtInformacao.setToolTipText("Informação");
jbtInformacao.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtInformacao.setBounds(new Rectangle(724, 1, 61, 52));
jbtInformacao.addKeyListener(this);
jbtInformacao.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane
.showMessageDialog(
null,
"Gerenciador De Aplicativos\n"
+ "\nO gerenciador de
aplicativos foi feito com o intuito de estudar a linguagem "
+ "\nde programação Java na
plataforma Eclipse. "
+ "\nEsse aplicativo tem como
objetivo reunir os icone dos softwares mais usados "
+ "\ndeixando o desktop
limpo, sem poluição visual. "
+ "\nBasta apenas um click no
icone do software que você deseja abrir, e se ele estiver "
+ "\ninstalado no seu
computador ele vai abrir, facilitando a procura pelo o icone entre "
+ "\ntantas coisas na área de
trabalho. ",
"Grenciador De Aplicativos",
JOptionPane.INFORMATION_MESSAGE);
}
});
}
return jbtInformacao;
}
private JButton getjbtLinuxWriter() {
if (jbtLinuxWriter == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Writer.png"));
jbtLinuxWriter = new JButton(icone);
jbtLinuxWriter.setContentAreaFilled(false);
jbtLinuxWriter.setBorderPainted(false);
jbtLinuxWriter.setToolTipText("Write");
jbtLinuxWriter.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtLinuxWriter.setBounds(new Rectangle(-12, -6, 90, 90));
jbtLinuxWriter.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec("writer");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Você não estar no Linux! \nSeu sistema
operacional é: \n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtLinuxWriter;
}
private JButton getJbtLinuxCalc() {
if (jbtLinuxCalc == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Calc.png"));
jbtLinuxCalc = new JButton(icone);
jbtLinuxCalc.setContentAreaFilled(false);
jbtLinuxCalc.setBorderPainted(false);
jbtLinuxCalc.setToolTipText("Calc");
jbtLinuxCalc.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtLinuxCalc.setBounds(new Rectangle(-11, 60, 90, 90));
jbtLinuxCalc.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec("oocalc");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Você não estar no Linux! \nSeu sistema
operacional é: \n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtLinuxCalc;
}
private JButton getJbtLinuxBase() {
if (jbtLinuxBase == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Base.png"));
jbtLinuxBase = new JButton(icone);
jbtLinuxBase.setContentAreaFilled(false);
jbtLinuxBase.setBorderPainted(false);
jbtLinuxBase.setToolTipText("Base");
jbtLinuxBase.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtLinuxBase.setBounds(new Rectangle(-12, 118, 90, 90));
jbtLinuxBase.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec("oobase");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Você não estar no Linux! \nSeu sistema
operacional é: \n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtLinuxBase;
}
private JButton getJbtLinuxImpress() {
if (jbtLinuxImpress == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Impress.png"));
jbtLinuxImpress = new JButton(icone);
jbtLinuxImpress.setContentAreaFilled(false);
jbtLinuxImpress.setBorderPainted(false);
jbtLinuxImpress.setToolTipText("Impress");
jbtLinuxImpress.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtLinuxImpress.setBounds(new Rectangle(-12, 170, 90, 90));
jbtLinuxImpress.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec("ooimpress");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Você não estar no Linux! \nSeu sistema
operacional é: \n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtLinuxImpress;
}
private JButton getJbtLinuxGIMP() {
if (jbtLinuxGIMP == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Gimp.png"));
jbtLinuxGIMP = new JButton(icone);
jbtLinuxGIMP.setContentAreaFilled(false);
jbtLinuxGIMP.setBorderPainted(false);
jbtLinuxGIMP.setToolTipText("Gimp");
jbtLinuxGIMP.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtLinuxGIMP.setBounds(new Rectangle(-12, 221, 90, 90));
jbtLinuxGIMP.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec("gimp");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Você não estar no Linux! \nSeu sistema
operacional é: \n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtLinuxGIMP;
}
private JButton getJbtLinuxKopete() {
if (jbtLinuxKopete == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Kopete.png"));
jbtLinuxKopete = new JButton(icone);
jbtLinuxKopete.setContentAreaFilled(false);
jbtLinuxKopete.setBorderPainted(false);
jbtLinuxKopete.setToolTipText("Kopete");
jbtLinuxKopete.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtLinuxKopete.setBounds(new Rectangle(-12, 324, 90, 90));
jbtLinuxKopete.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
System.out.println("mouseClicked()");
}
});
}
return jbtLinuxKopete;
}
private JButton getJbtLinuxPidgin() {
if (jbtLinuxPidgin == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Pidgin.png"));
jbtLinuxPidgin = new JButton(icone);
jbtLinuxPidgin.setContentAreaFilled(false);
jbtLinuxPidgin.setBorderPainted(false);
jbtLinuxPidgin.setToolTipText("Pidgin");
jbtLinuxPidgin.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtLinuxPidgin.setBounds(new Rectangle(-12, 272, 90, 90));
jbtLinuxPidgin.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec("pidgin");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Você não estar no Linux! \nSeu sistema
operacional é: \n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtLinuxPidgin;
}
private JButton getJbtLinuxAMSN() {
if (jbtLinuxAMSN == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/AMSN.png"));
jbtLinuxAMSN = new JButton(icone);
jbtLinuxAMSN.setContentAreaFilled(false);
jbtLinuxAMSN.setBorderPainted(false);
jbtLinuxAMSN.setToolTipText("aMSN");
jbtLinuxAMSN.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtLinuxAMSN.setBounds(new Rectangle(58, 272, 90, 90));
jbtLinuxAMSN.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
System.out.println("mouseClicked()");
}
});
}
return jbtLinuxAMSN;
}
private JButton getJbtLinuxTuxPaint() {
if (jbtLinuxTuxPaint == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Tux.png"));
jbtLinuxTuxPaint = new JButton(icone);
jbtLinuxTuxPaint.setContentAreaFilled(false);
jbtLinuxTuxPaint.setBorderPainted(false);
jbtLinuxTuxPaint.setToolTipText("Tux Paint");
jbtLinuxTuxPaint.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtLinuxTuxPaint.setBounds(new Rectangle(127, -6, 90, 90));
jbtLinuxTuxPaint
.addMouseListener(new java.awt.event.MouseAdapter() {
public void
mouseClicked(java.awt.event.MouseEvent e) {
System.out.println("mouseClicked()");
}
});
}
return jbtLinuxTuxPaint;
}
private JButton getJbtLinuxGNU() {
if (jbtLinuxGNU == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/GNU.png"));
jbtLinuxGNU = new JButton(icone);
jbtLinuxGNU.setContentAreaFilled(false);
jbtLinuxGNU.setBorderPainted(false);
jbtLinuxGNU.setToolTipText("GNU Paint");
jbtLinuxGNU.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtLinuxGNU.setBounds(new Rectangle(58, 60, 90, 90));
jbtLinuxGNU.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
System.out.println("mouseClicked()");
}
});
}
return jbtLinuxGNU;
}
private JButton getJbtLinuxKonqueror() {
if (jbtLinuxKonqueror == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Konqueror.png"));
jbtLinuxKonqueror = new JButton(icone);
jbtLinuxKonqueror.setContentAreaFilled(false);
jbtLinuxKonqueror.setBorderPainted(false);
jbtLinuxKonqueror.setToolTipText("Konqueror");
jbtLinuxKonqueror.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtLinuxKonqueror.setBounds(new Rectangle(58, 118, 90, 90));
jbtLinuxKonqueror
.addMouseListener(new java.awt.event.MouseAdapter() {
public void
mouseClicked(java.awt.event.MouseEvent e) {
System.out.println("mouseClicked()");
}
});
}
return jbtLinuxKonqueror;
}
private JButton getJbtLinuxAmarok() {
if (jbtLinuxAmarok == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Amarok.png"));
jbtLinuxAmarok = new JButton(icone);
jbtLinuxAmarok.setContentAreaFilled(false);
jbtLinuxAmarok.setBorderPainted(false);
jbtLinuxAmarok.setToolTipText("Amarok");
jbtLinuxAmarok.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtLinuxAmarok.setBounds(new Rectangle(58, 170, 90, 90));
jbtLinuxAmarok.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
System.out.println("mouseClicked()");
}
});
}
return jbtLinuxAmarok;
}
private JButton getJbtLinuxTotem() {
if (jbtLinuxTotem == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Totem.png"));
jbtLinuxTotem = new JButton(icone);
jbtLinuxTotem.setContentAreaFilled(false);
jbtLinuxTotem.setBorderPainted(false);
jbtLinuxTotem.setToolTipText("Totem");
jbtLinuxTotem.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtLinuxTotem.setBounds(new Rectangle(58, 221, 90, 90));
jbtLinuxTotem.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
System.out.println("mouseClicked()");
}
});
}
return jbtLinuxTotem;
}
private JButton getJbtLinuxKaffeine() {
if (jbtLinuxKaffeine == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Kaffeine.png"));
jbtLinuxKaffeine = new JButton(icone);
jbtLinuxKaffeine.setContentAreaFilled(false);
jbtLinuxKaffeine.setBorderPainted(false);
jbtLinuxKaffeine.setToolTipText("Kaffeine");
jbtLinuxKaffeine.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtLinuxKaffeine.setBounds(new Rectangle(58, 324, 90, 90));
jbtLinuxKaffeine
.addMouseListener(new java.awt.event.MouseAdapter() {
public void
mouseClicked(java.awt.event.MouseEvent e) {
System.out.println("mouseClicked()");
}
});
}
return jbtLinuxKaffeine;
}
private JButton getjbtLinuxDriveCD() {
if (jbtLinuxDriveCD == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/CD.png"));
jbtLinuxDriveCD = new JButton(icone);
jbtLinuxDriveCD.setContentAreaFilled(false);
jbtLinuxDriveCD.setBorderPainted(false);
jbtLinuxDriveCD.setToolTipText("Drive CD");
jbtLinuxDriveCD.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtLinuxDriveCD.setBounds(new Rectangle(699, -6, 90, 90));
jbtLinuxDriveCD.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
//Sistema Linux
try {
Runtime.getRuntime().exec("eject
/dev/cdrom");
Thread.sleep(2000);
Runtime.getRuntime().exec("eject -t
/dev/cdrom");
Thread.sleep(2000);
Runtime.getRuntime().exec("shutdown -r now");
} catch (IOException e1) {
e1.printStackTrace();
} catch (InterruptedException e1) {
e1.printStackTrace();
}
} catch (Exception e2) {
JOptionPane.showMessageDialog(null,
"Você não estar no Linux! \nSeu sistema
operacional é: \n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtLinuxDriveCD;
}
private JButton getjbtLinuxDiscoC() {
if (jbtLinuxDiscoC == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/PastaC.png"));
jbtLinuxDiscoC = new JButton(icone);
jbtLinuxDiscoC.setContentAreaFilled(false);
jbtLinuxDiscoC.setBorderPainted(false);
jbtLinuxDiscoC.setToolTipText("Disco C");
jbtLinuxDiscoC.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtLinuxDiscoC.setBounds(new Rectangle(699, 60, 90, 90));
}
return jbtLinuxDiscoC;
}
private JButton getJbtLinuxDiscoD() {
if (jbtLinuxDiscoD == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/PastaD.png"));
jbtLinuxDiscoD = new JButton(icone);
jbtLinuxDiscoD.setContentAreaFilled(false);
jbtLinuxDiscoD.setBorderPainted(false);
jbtLinuxDiscoD.setToolTipText("Disco D");
jbtLinuxDiscoD.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtLinuxDiscoD.setBounds(new Rectangle(699, 118, 90, 90));
}
return jbtLinuxDiscoD;
}
// ********************************Começo da aba de apresentação
private JButton getJbtMultiplataforma() {
if (jbtMultiplataforma == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Multiplataforma.png"));
jbtMultiplataforma = new JButton(icone);
jbtMultiplataforma.setContentAreaFilled(false);
jbtMultiplataforma.setBorderPainted(false);
jbtMultiplataforma.setFocusPainted(false);// Tira o fucus do
botão
jbtMultiplataforma
.setToolTipText("Informação Do Sistema Operacional");
jbtMultiplataforma.setCursor(new Cursor(Cursor.HAND_CURSOR));
// Imagem ao passar o mouse
jbtMultiplataforma.setRolloverIcon(new ImageIcon(getClass()
.getResource("/imagens/Multiplataforma350.png")));
// Imagem ao pressionar o mouser
jbtMultiplataforma.setPressedIcon(new ImageIcon(getClass()
.getResource("/imagens/Multiplataforma350.png")));
jbtMultiplataforma.setBounds(new Rectangle(226, 99, 320,
350));
jbtMultiplataforma
.addMouseListener(new java.awt.event.MouseAdapter() {
public void
mouseClicked(java.awt.event.MouseEvent e) {
// Vai para a aba Linux
jTabbedPane.insertTab("Informações Do
Sistema",
null, getjPanelSistemaOperacional(),
"Informações Do Sistema", 1);
jTabbedPane
.setSelectedComponent(getjPanelSistemaOperacional());
int i16 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i16,
new ButtonTabComponent(jTabbedPane));
verificarConecxao();
}
});
}
return jbtMultiplataforma;
}
private JButton getjbtWindows() {
if (jbtWindows == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Windows.png"));
jbtWindows = new JButton(icone);
jbtWindows.setToolTipText("Windows");
jbtWindows.setContentAreaFilled(false);
jbtWindows.setBorderPainted(false);
jbtWindows.setFocusPainted(false);// Tira o fucus do botão
jbtWindows.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtWindows.setRolloverIcon(new
ImageIcon(getClass().getResource(
"/imagens/Windows50.png")));
jbtWindows.setPressedIcon(new
ImageIcon(getClass().getResource(
"/imagens/Windows50.png")));
jbtWindows.setBounds(new Rectangle(343, 1, 90, 90));
jbtWindows.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
//
jTabbedPane.setSelectedComponent(getjPanelWindows());
jTabbedPane.insertTab("Windows", null,
getjPanelWindows(),
"Windows", 1);
jTabbedPane.setSelectedComponent(getjPanelWindows());
int i1 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i1, new
ButtonTabComponent(
jTabbedPane));
}
});
}
return jbtWindows;
}
private JButton getJbtAndroid() {
if (jbtAndroid == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Android.png"));
jbtAndroid = new JButton(icone);
jbtAndroid.setToolTipText("Android");
jbtAndroid.setContentAreaFilled(false);
jbtAndroid.setBorderPainted(false);
jbtAndroid.setFocusPainted(false);// Tira o fucus do botão
jbtAndroid.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtAndroid.setRolloverIcon(new
ImageIcon(getClass().getResource(
"/imagens/Android50.png")));
jbtAndroid.setPressedIcon(new
ImageIcon(getClass().getResource(
"/imagens/Android50.png")));
jbtAndroid.setBounds(new Rectangle(535, 45, 90, 90));
jbtAndroid.addMouseListener(new java.awt.event.MouseAdapter()
{
public void mouseClicked(java.awt.event.MouseEvent e) {
//
jTabbedPane.setSelectedComponent(getjPanelAndroid());
jTabbedPane.insertTab("Android", null,
getjPanelAndroid(),
"Android", 1);
jTabbedPane.setSelectedComponent(getjPanelAndroid());
int i5 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i5, new
ButtonTabComponent(
jTabbedPane));
}
});
}
return jbtAndroid;
}
private JButton getJbtLinux() {
if (jbtLinux == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Linux.png"));
jbtLinux = new JButton(icone);
jbtLinux.setToolTipText("Linux");
jbtLinux.setContentAreaFilled(false);
jbtLinux.setBorderPainted(false);
jbtLinux.setFocusPainted(false);// Tira o fucus do botão
jbtLinux.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtLinux.setRolloverIcon(new
ImageIcon(getClass().getResource(
"/imagens/Linux50.png")));
jbtLinux.setPressedIcon(new ImageIcon(getClass().getResource(
"/imagens/Linux50.png")));
jbtLinux.setBounds(new Rectangle(445, 12, 90, 90));
jbtLinux.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
// Vai para a aba Linux
jTabbedPane.insertTab("Linux", null,
getjPanelLinux(),
"Linux", 1);
jTabbedPane.setSelectedComponent(getjPanelLinux());
int i2 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i2, new
ButtonTabComponent(
jTabbedPane));
}
});
}
return jbtLinux;
}
private JButton getJbtMacOS() {
if (jbtMacOS == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/MacOS.png"));
jbtMacOS = new JButton(icone);
jbtMacOS.setToolTipText("Mac OS");
jbtMacOS.setContentAreaFilled(false);
jbtMacOS.setBorderPainted(false);
jbtMacOS.setFocusPainted(false);// Tira o fucus do botão
jbtMacOS.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtMacOS.setRolloverIcon(new
ImageIcon(getClass().getResource(
"/imagens/MacOS60.png")));
jbtMacOS.setPressedIcon(new ImageIcon(getClass().getResource(
"/imagens/MacOS60.png")));
jbtMacOS.setBounds(new Rectangle(573, 124, 90, 90));
jbtMacOS.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
//
jTabbedPane.setSelectedComponent(getjPanelMacintosh());
jTabbedPane.insertTab("Mac OS", null,
getjPanelMacintosh(),
"Mac OS", 1);
jTabbedPane.setSelectedComponent(getjPanelMacintosh());
int i3 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i3, new
ButtonTabComponent(
jTabbedPane));
}
});
}
return jbtMacOS;
}
private JButton getJbtSolaris() {
if (jbtSolaris == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Solaris.png"));
jbtSolaris = new JButton(icone);
jbtSolaris.setToolTipText("Solaris");
jbtSolaris.setContentAreaFilled(false);
jbtSolaris.setBorderPainted(false);
jbtSolaris.setFocusPainted(false);// Tira o fucus do botão
jbtSolaris.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtSolaris.setRolloverIcon(new
ImageIcon(getClass().getResource(
"/imagens/Solaris50.png")));
jbtSolaris.setPressedIcon(new
ImageIcon(getClass().getResource(
"/imagens/Solaris50.png")));
jbtSolaris.setBounds(new Rectangle(241, 7, 90, 90));
jbtSolaris.addMouseListener(new java.awt.event.MouseAdapter()
{
public void mouseClicked(java.awt.event.MouseEvent e) {
//
jTabbedPane.setSelectedComponent(getjPanelSolaris());
jTabbedPane.insertTab("Solaris", null,
getjPanelSolaris(),
"Solaris", 1);
jTabbedPane.setSelectedComponent(getjPanelSolaris());
int i4 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i4, new
ButtonTabComponent(
jTabbedPane));
}
});
}
return jbtSolaris;
}
private JButton getJbtIBM() {
if (jbtIBM == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/IBMOS.png"));
jbtIBM = new JButton(icone);
jbtIBM.setToolTipText("IBM OS");
jbtIBM.setContentAreaFilled(false);
jbtIBM.setBorderPainted(false);
jbtIBM.setFocusPainted(false);// Tira o fucus do botão
jbtIBM.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtIBM.setRolloverIcon(new ImageIcon(getClass().getResource(
"/imagens/IBMOS50.png")));
jbtIBM.setPressedIcon(new ImageIcon(getClass().getResource(
"/imagens/IBMOS50.png")));
jbtIBM.setBounds(new Rectangle(145, 45, 90, 90));
jbtIBM.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
// jTabbedPane.setSelectedComponent(getjPanelIBM());
jTabbedPane.insertTab("IBM OS/2", null,
getjPanelIBM(),
"IBM OS/2", 1);
jTabbedPane.setSelectedComponent(getjPanelIBM());
int i6 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i6, new
ButtonTabComponent(
jTabbedPane));
}
});
}
return jbtIBM;
}
private JButton getJbtSymbian() {
if (jbtSymbian == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Symbian.png"));
jbtSymbian = new JButton(icone);
jbtSymbian.setToolTipText("Symbian");
jbtSymbian.setContentAreaFilled(false);
jbtSymbian.setBorderPainted(false);
jbtSymbian.setFocusPainted(false);// Tira o fucus do botão
jbtSymbian.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtSymbian.setRolloverIcon(new
ImageIcon(getClass().getResource(
"/imagens/Symbian60.png")));
jbtSymbian.setPressedIcon(new
ImageIcon(getClass().getResource(
"/imagens/Symbian60.png")));
jbtSymbian.setBounds(new Rectangle(86, 124, 110, 90));
jbtSymbian.addMouseListener(new java.awt.event.MouseAdapter()
{
public void mouseClicked(java.awt.event.MouseEvent e) {
//
jTabbedPane.setSelectedComponent(getjPanelSymbian());
jTabbedPane.insertTab("Symbian", null,
getjPanelSymbian(),
"Symbia", 1);
jTabbedPane.setSelectedComponent(getjPanelSymbian());
int i7 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i7, new
ButtonTabComponent(
jTabbedPane));
}
});
}
return jbtSymbian;
}
private JButton getjbtHaiku() {
if (jbtHaiku == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Haiku.png"));
jbtHaiku = new JButton(icone);
jbtHaiku.setToolTipText("Haiku");
jbtHaiku.setContentAreaFilled(false);
jbtHaiku.setBorderPainted(false);
jbtHaiku.setFocusPainted(false);// Tira o fucus do botão
jbtHaiku.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtHaiku.setRolloverIcon(new
ImageIcon(getClass().getResource(
"/imagens/Haiku70.png")));
jbtHaiku.setPressedIcon(new ImageIcon(getClass().getResource(
"/imagens/Haiku70.png")));
jbtHaiku.setBounds(new Rectangle(85, 223, 90, 90));
jbtHaiku.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
// Vai para a aba Haiku
jTabbedPane.insertTab("Haiku", null,
getjPanelHaiku(),
"Haiku", 1);
jTabbedPane.setSelectedComponent(getjPanelHaiku());
int i12 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i12, new
ButtonTabComponent(
jTabbedPane));
}
});
}
return jbtHaiku;
}
private JButton getjbtUnix() {
if (jbtUnix == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Unix.png"));
jbtUnix = new JButton(icone);
jbtUnix.setToolTipText("Unix");
jbtUnix.setContentAreaFilled(false);
jbtUnix.setBorderPainted(false);
jbtUnix.setFocusPainted(false);// Tira o fucus do botão
jbtUnix.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtUnix.setRolloverIcon(new ImageIcon(getClass().getResource(
"/imagens/Unix50.png")));
jbtUnix.setPressedIcon(new ImageIcon(getClass().getResource(
"/imagens/Unix50.png")));
jbtUnix.setBounds(new Rectangle(586, 223, 90, 90));
jbtUnix.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
// Vai para a aba Unix
jTabbedPane.insertTab("Unix", null, getjPanelUnix(),
"Unix", 1);
jTabbedPane.setSelectedComponent(getjPanelUnix());
int i9 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i9, new
ButtonTabComponent(
jTabbedPane));
}
});
}
return jbtUnix;
}
private JButton getjbtIos() {
if (jbtIos == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/iOS.png"));
jbtIos = new JButton(icone);
jbtIos.setToolTipText("iOS Apple");
jbtIos.setContentAreaFilled(false);
jbtIos.setBorderPainted(false);
jbtIos.setFocusPainted(false);// Tira o fucus do botão
jbtIos.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtIos.setRolloverIcon(new ImageIcon(getClass().getResource(
"/imagens/iOS70.png")));
jbtIos.setPressedIcon(new ImageIcon(getClass().getResource(
"/imagens/iOS70.png")));
jbtIos.setBounds(new Rectangle(572, 302, 90, 90));
jbtIos.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
// Vai para a aba iOS Apple
jTabbedPane
.insertTab("iOs", null, getjPanelIOS(),
"iOS", 1);
jTabbedPane.setSelectedComponent(getjPanelIOS());
int i10 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i10, new
ButtonTabComponent(
jTabbedPane));
}
});
}
return jbtIos;
}
private JButton getjbtMinix() {
if (jbtMinix == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Minix.png"));
jbtMinix = new JButton(icone);
jbtMinix.setToolTipText("Minix");
jbtMinix.setContentAreaFilled(false);
jbtMinix.setBorderPainted(false);
jbtMinix.setFocusPainted(false);// Tira o fucus do botão
jbtMinix.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtMinix.setRolloverIcon(new
ImageIcon(getClass().getResource(
"/imagens/Minix50.png")));
jbtMinix.setPressedIcon(new ImageIcon(getClass().getResource(
"/imagens/Minix50.png")));
jbtMinix.setBounds(new Rectangle(98, 302, 90, 100));
jbtMinix.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
// Vai para a aba Minix
jTabbedPane.insertTab("Minix", null,
getjPanelMinix(),
"Minix", 1);
jTabbedPane.setSelectedComponent(getjPanelMinix());
int i13 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i13, new
ButtonTabComponent(
jTabbedPane));
}
});
}
return jbtMinix;
}
private JButton getjbtOpenBSD() {
if (jbtOpenBSD == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/OpenBSD.png"));
jbtOpenBSD = new JButton(icone);
jbtOpenBSD.setToolTipText("OpenBSD");
jbtOpenBSD.setContentAreaFilled(false);
jbtOpenBSD.setBorderPainted(false);
jbtOpenBSD.setFocusPainted(false);// Tira o fucus do botão
jbtOpenBSD.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtOpenBSD.setRolloverIcon(new
ImageIcon(getClass().getResource(
"/imagens/OpenBSD60.png")));
jbtOpenBSD.setPressedIcon(new
ImageIcon(getClass().getResource(
"/imagens/OpenBSD60.png")));
jbtOpenBSD.setBounds(new Rectangle(546, 378, 90, 90));
jbtOpenBSD.addMouseListener(new java.awt.event.MouseAdapter()
{
public void mouseClicked(java.awt.event.MouseEvent e) {
// Vai para a aba OpenBSD
jTabbedPane.insertTab("OpenBSD", null,
getjPanelOpenBSD(),
"OpenBSD", 1);
jTabbedPane.setSelectedComponent(getjPanelOpenBSD());
int i11 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i11, new
ButtonTabComponent(
jTabbedPane));
}
});
}
return jbtOpenBSD;
}
private JButton getjbtFreeBSD() {
if (jbtFreeBSD == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/FreeBSD.png"));
jbtFreeBSD = new JButton(icone);
jbtFreeBSD.setToolTipText("FreeBSD");
jbtFreeBSD.setContentAreaFilled(false);
jbtFreeBSD.setBorderPainted(false);
jbtFreeBSD.setFocusPainted(false);// Tira o fucus do botão
jbtFreeBSD.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtFreeBSD.setRolloverIcon(new
ImageIcon(getClass().getResource(
"/imagens/FreeBSD50.png")));
jbtFreeBSD.setPressedIcon(new
ImageIcon(getClass().getResource(
"/imagens/FreeBSD50.png")));
jbtFreeBSD.setBounds(new Rectangle(156, 398, 90, 90));
jbtFreeBSD.addMouseListener(new java.awt.event.MouseAdapter()
{
public void mouseClicked(java.awt.event.MouseEvent e) {
// Vai para a aba FreeBSD
jTabbedPane.insertTab("FreeBSD", null,
getjPanelFreeBSD(),
"FreeBSD", 1);
jTabbedPane.setSelectedComponent(getjPanelFreeBSD());
int i14 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i14, new
ButtonTabComponent(
jTabbedPane));
}
});
}
return jbtFreeBSD;
}
private JButton getjbtAmigaOS() {
if (jbtAmigaOS == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/AmigaOS.png"));
jbtAmigaOS = new JButton(icone);
jbtAmigaOS.setToolTipText("Amiga Os");
jbtAmigaOS.setContentAreaFilled(false);
jbtAmigaOS.setBorderPainted(false);
jbtAmigaOS.setFocusPainted(false);// Tira o fucus do botão
jbtAmigaOS.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtAmigaOS.setRolloverIcon(new
ImageIcon(getClass().getResource(
"/imagens/AmigaOS50.png")));
jbtAmigaOS.setPressedIcon(new
ImageIcon(getClass().getResource(
"/imagens/AmigaOS50.png")));
jbtAmigaOS.setBounds(new Rectangle(271, 420, 90, 90));
jbtAmigaOS.addMouseListener(new java.awt.event.MouseAdapter()
{
public void mouseClicked(java.awt.event.MouseEvent e) {
// Vai para a aba Linux
jTabbedPane.insertTab("Amiga OS", null,
getjPanelAmigaOS(),
"Amiga OS", 1);
jTabbedPane.setSelectedComponent(getjPanelAmigaOS());
int i8 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i8, new
ButtonTabComponent(
jTabbedPane));
}
});
}
return jbtAmigaOS;
}
private JButton getJbtYouOS() {
if (jbtYouOS == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/YouOS.png"));
jbtYouOS = new JButton(icone);
jbtYouOS.setToolTipText("youOS");
jbtYouOS.setContentAreaFilled(false);
jbtYouOS.setBorderPainted(false);
jbtYouOS.setFocusPainted(false);// Tira o fucus do botão
jbtYouOS.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtYouOS.setBounds(new Rectangle(430, 440, 90, 90));
jbtYouOS.setRolloverIcon(new
ImageIcon(getClass().getResource(
"/imagens/YouOS60.png")));
jbtYouOS.setPressedIcon(new ImageIcon(getClass().getResource(
"/imagens/YouOS60.png")));
jbtYouOS.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
// Vai para a aba YouOS
jTabbedPane.insertTab("YouOS", null,
getjPanelYouOS(),
"YouOS", 1);
jTabbedPane.setSelectedComponent(getjPanelYouOS());
int i15 = jTabbedPane.getSelectedIndex();
jTabbedPane.setTabComponentAt(i15, new
ButtonTabComponent(
jTabbedPane));
}
});
}
return jbtYouOS;
}// ***************************************Fim da Aba de Apresentação
private JRadioButton getJrbMetal() {
if (jrbMetal == null) {
jrbMetal = new JRadioButton("Metal");
jrbMetal.setBounds(new Rectangle(9, 644, 58, 22));
jrbMetal.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
ItemSelecionado iselect = new ItemSelecionado();
for (int i = 0; i < looks.length; i++) {
escolha[i] = new
JRadioButton(looks[i].getName());
escolha[i].addItemListener(iselect);
grupo.add(escolha[i]);
}
// Indix 0 Look and Feel Metal
escolha[0].setSelected(true);
jrbMetal.setSelected(true);
jrbMotif.setSelected(false);
jrbWindows.setSelected(false);
jrbWindowsClassico.setSelected(false);
jrbNimbus.setSelected(false);
}
});
}
return jrbMetal;
}
private JRadioButton getJrbMotif() {
if (jrbMotif == null) {
jrbMotif = new JRadioButton("Motif");
jrbMotif.setBounds(new Rectangle(321, 644, 55, 22));
jrbMotif.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
ItemSelecionado iselect = new ItemSelecionado();
for (int i = 0; i < looks.length; i++) {
escolha[i] = new
JRadioButton(looks[i].getName());
escolha[i].addItemListener(iselect);
grupo.add(escolha[i]);
}
// Indix 2 Look and Feel Motif
escolha[2].setSelected(true);
jrbMetal.setSelected(false);
jrbMotif.setSelected(true);
jrbWindows.setSelected(false);
jrbWindowsClassico.setSelected(false);
jrbNimbus.setSelected(false);
}
});
}
return jrbMotif;
}
private JRadioButton getJrbWindows() {
if (jrbWindows == null) {
jrbWindows = new JRadioButton("Windows");
jrbWindows.setBounds(new Rectangle(477, 645, 81, 22));
jrbWindows.addMouseListener(new java.awt.event.MouseAdapter()
{
public void mouseClicked(java.awt.event.MouseEvent e) {
ItemSelecionado iselect = new ItemSelecionado();
for (int i = 0; i < looks.length; i++) {
escolha[i] = new
JRadioButton(looks[i].getName());
escolha[i].addItemListener(iselect);
grupo.add(escolha[i]);
}
// Indix 3 Look and Feel Windows
escolha[3].setSelected(true);
jrbMetal.setSelected(false);
jrbMotif.setSelected(false);
jrbWindows.setSelected(true);
jrbWindowsClassico.setSelected(false);
jrbNimbus.setSelected(false);
}
});
}
return jrbWindows;
}
private JRadioButton getJrbWindowsClassico() {
if (jrbWindowsClassico == null) {
jrbWindowsClassico = new JRadioButton("Windows Classico");
jrbWindowsClassico.setBounds(new Rectangle(642, 644, 133,
22));
jrbWindowsClassico
.addMouseListener(new java.awt.event.MouseAdapter() {
public void
mouseClicked(java.awt.event.MouseEvent e) {
ItemSelecionado iselect = new
ItemSelecionado();
for (int i = 0; i < looks.length; i++) {
escolha[i] = new JRadioButton(looks[i]
.getName());
escolha[i].addItemListener(iselect);
grupo.add(escolha[i]);
}
// Indix 4 Look and Feel Windows Classico
escolha[4].setSelected(true);
jrbMetal.setSelected(false);
jrbMotif.setSelected(false);
jrbWindows.setSelected(false);
jrbWindowsClassico.setSelected(true);
jrbNimbus.setSelected(false);
}
});
}
return jrbWindowsClassico;
}
private JRadioButton getJrbNimbus() {
if (jrbNimbus == null) {
jrbNimbus = new JRadioButton("Nimbus");
jrbNimbus.setBounds(new Rectangle(150, 645, 70, 21));
jrbNimbus.addMouseListener(new java.awt.event.MouseAdapter()
{
public void mouseClicked(java.awt.event.MouseEvent e) {
ItemSelecionado iselect = new ItemSelecionado();
for (int i = 0; i < looks.length; i++) {
escolha[i] = new
JRadioButton(looks[i].getName());
escolha[i].addItemListener(iselect);
grupo.add(escolha[i]);
}
// Indix 1 Look and Feel Nimbus
escolha[1].setSelected(true);
jrbMetal.setSelected(false);
jrbMotif.setSelected(false);
jrbWindows.setSelected(false);
jrbWindowsClassico.setSelected(false);
jrbNimbus.setSelected(true);
}
});
}
return jrbNimbus;
}
private JButton getJbtAmigaOSLogo() {
if (jbtAmigaOSLogo == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/AmigaOSLogo.png"));
jbtAmigaOSLogo = new JButton(icone);
jbtAmigaOSLogo.setBounds(new Rectangle(226, 99, 300, 300));
jbtAmigaOSLogo.setContentAreaFilled(false);
jbtAmigaOSLogo.setBorderPainted(false);
jbtAmigaOSLogo.setFocusPainted(false);// Tira o fucus do
botão
jbtAmigaOSLogo.setToolTipText("Amiga Os");
jbtAmigaOSLogo.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtAmigaOSLogo.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec("amigaOS");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Seu sistema operacional não é Amiga OS é
\n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtAmigaOSLogo;
}
private JButton getJbtUnixLogo() {
if (jbtUnixLogo == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/UnixLogo.png"));
jbtUnixLogo = new JButton(icone);
jbtUnixLogo.setContentAreaFilled(false);
jbtUnixLogo.setBorderPainted(false);
jbtUnixLogo.setFocusPainted(false);// Tira o fucus do botão
jbtUnixLogo.setToolTipText("Unix");
jbtUnixLogo.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtUnixLogo.setBounds(new Rectangle(226, 99, 300, 300));
jbtUnixLogo.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec("unix");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Seu sistema operacional não é Unix é \n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtUnixLogo;
}
private JButton getJbtIOSLogo() {
if (jbtIOSLogo == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/iOSLogo.png"));
jbtIOSLogo = new JButton(icone);
jbtIOSLogo.setContentAreaFilled(false);
jbtIOSLogo.setBorderPainted(false);
jbtIOSLogo.setFocusPainted(false);// Tira o fucus do botão
jbtIOSLogo.setToolTipText("iOS");
jbtIOSLogo.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtIOSLogo.setBounds(new Rectangle(226, 99, 300, 300));
jbtIOSLogo.addMouseListener(new java.awt.event.MouseAdapter()
{
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec("iOS");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Seu sistema operacional não é iOS é \n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtIOSLogo;
}
private JButton getJbtOpenBSDLogo() {
if (jbtOpenBSDLogo == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/OpenBSDLogo.png"));
jbtOpenBSDLogo = new JButton(icone);
jbtOpenBSDLogo.setContentAreaFilled(false);
jbtOpenBSDLogo.setBorderPainted(false);
jbtOpenBSDLogo.setFocusPainted(false);// Tira o fucus do
botão
jbtOpenBSDLogo.setToolTipText("OpenBSD");
jbtOpenBSDLogo.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtOpenBSDLogo.setBounds(new Rectangle(226, 99, 330, 300));
jbtOpenBSDLogo.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec("OpenBSD");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Seu sistema operacional não é OpenBSD é
\n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtOpenBSDLogo;
}
private JButton getJbtMinixLogo() {
if (jbtMinixLogo == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/MinixLogo.png"));
jbtMinixLogo = new JButton(icone);
jbtMinixLogo.setContentAreaFilled(false);
jbtMinixLogo.setBorderPainted(false);
jbtMinixLogo.setFocusPainted(false);// Tira o fucus do botão
jbtMinixLogo.setToolTipText("Minix");
jbtMinixLogo.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtMinixLogo.setBounds(new Rectangle(226, 99, 300, 410));
jbtMinixLogo.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec("minix");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Seu sistema operacional não é Minix é
\n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtMinixLogo;
}
private JButton getJbtHaikuLogo() {
if (jbtHaikuLogo == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/HaikuLogo.png"));
jbtHaikuLogo = new JButton(icone);
jbtHaikuLogo.setContentAreaFilled(false);
jbtHaikuLogo.setBorderPainted(false);
jbtHaikuLogo.setFocusPainted(false);// Tira o fucus do botão
jbtHaikuLogo.setToolTipText("Haiku");
jbtHaikuLogo.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtHaikuLogo.setBounds(new Rectangle(226, 99, 300, 300));
jbtHaikuLogo.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec("haiku");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Seu sistema operacional não é Haiku é
\n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtHaikuLogo;
}
private JButton getJbtYouOSLogo() {
if (jbtYouOSLogo == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/YouOSLogo.png"));
jbtYouOSLogo = new JButton(icone);
jbtYouOSLogo.setContentAreaFilled(false);
jbtYouOSLogo.setBorderPainted(false);
jbtYouOSLogo.setFocusPainted(false);// Tira o fucus do botão
jbtYouOSLogo.setToolTipText("YouOS");
jbtYouOSLogo.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtYouOSLogo.setBounds(new Rectangle(226, 99, 300, 300));
jbtYouOSLogo.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec("youOS");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Seu sistema operacional não é YouOS é
\n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtYouOSLogo;
}
private JButton getJbtFreeBSDLogo() {
if (jbtFreeBSDLogo == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/FreeBSDLogo.png"));
jbtFreeBSDLogo = new JButton(icone);
jbtFreeBSDLogo.setContentAreaFilled(false);
jbtFreeBSDLogo.setBorderPainted(false);
jbtFreeBSDLogo.setFocusPainted(false);// Tira o fucus do
botão
jbtFreeBSDLogo.setToolTipText("FreeBSD");
jbtFreeBSDLogo.setCursor(new Cursor(Cursor.HAND_CURSOR));
jbtFreeBSDLogo.setBounds(new Rectangle(226, 99, 320, 310));
jbtFreeBSDLogo.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec("freeBDS");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Seu sistema operacional não é FreeBSD é
\n"
+ System.getProperty("os.name"));
}
}
});
}
return jbtFreeBSDLogo;
}
private JButton getJbtWindowsMovieMaker() {
if (jbtWindowsMovieMaker == null) {
ImageIcon icone = new ImageIcon(getClass().getResource(
"/imagens/Movie Maker.png"));
jbtWindowsMovieMaker = new JButton(icone);
jbtWindowsMovieMaker.setContentAreaFilled(false);
jbtWindowsMovieMaker.setBorderPainted(false);
jbtWindowsMovieMaker.setToolTipText("Movie Maker");
jbtWindowsMovieMaker.setCursor(new
Cursor(Cursor.HAND_CURSOR));
jbtWindowsMovieMaker.addKeyListener(this);
jbtWindowsMovieMaker.setBounds(new Rectangle(115, 429, 90,
90));
jbtWindowsMovieMaker
.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEvent e) {
try {
Runtime.getRuntime().exec(
"cmd.exe /c start moviemk.exe");
} catch (IOException e1) {
e1.printStackTrace();
}
}
});
}
return jbtWindowsMovieMaker;
}
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
Gerenciador thisClass = new Gerenciador();
thisClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
thisClass.setVisible(true);
// criamos um locale para o Brasil
Locale localeBR = new Locale("pt", "BR");
// vamos obter a data e hora atual
Calendar agora = Calendar.getInstance();
// vamos formatar de acordo com o formato de
// data longa no português brasileiro
DateFormat df =
DateFormat.getDateInstance(DateFormat.FULL,
localeBR);
// vamos exibir o resultado
// Pegas o país
// jlbPais.setText(localeBR.getDisplayCountry());
// Pegas a data
jlbData.setText(df.format(agora.getTime()));
}
});
}
public Gerenciador() {
super();
// Inicializa o relogio
disparaRelogio();
initialize();
}
private void initialize() {
this.setSize(789, 706);
this.setContentPane(getJContentPane());
this.setTitle("Gerenciador De Aplicativos - J. Marcos B.");
// Tamanho fixo do programa, sem alteção
this.setResizable(false);
// Deixa o programa no meio da tela, centralizado
this.setLocationRelativeTo(null);
}
private JPanel getJContentPane() {
if (jContentPane == null) {
jlbData = new JLabel();
jlbData.setBounds(new Rectangle(451, 61, 260, 26));
jlbData.setHorizontalAlignment(SwingConstants.CENTER);
jlbData.setFont(new Font("Arial", Font.BOLD, 14));
jlbData.setToolTipText("Calendário");
jlbData.setCursor(new Cursor(Cursor.HAND_CURSOR));
jlbData.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
// Chamando o Calendario
Jcalendario c = new Jcalendario(null);
c.setVisible(true);
}
});
jlbRelogio = new JLabel();
jlbRelogio.setBounds(new Rectangle(717, 61, 61, 26));
jlbRelogio.setHorizontalAlignment(SwingConstants.CENTER);
jlbRelogio.setFont(new Font("Arial", Font.BOLD, 14));
jlbRelogio.setForeground(Color.red);
jlbRelogio.setToolTipText("Relógio");
jlbRelogio.setCursor(new Cursor(Cursor.HAND_CURSOR));
jlbRelogio.addMouseListener(new java.awt.event.MouseAdapter()
{
public void mouseClicked(java.awt.event.MouseEvent e) {
try {
Runtime.getRuntime().exec(
"cmd.exe /c start timedate.cpl");
} catch (IOException ea) {
}
}
});
jlbTitulo = new JLabel();
jlbTitulo.setBounds(new Rectangle(201, 4, 373, 34));
jlbTitulo.setFont(new Font("Arial", Font.BOLD, 28));
jlbTitulo.setHorizontalAlignment(SwingConstants.CENTER);
jlbTitulo.setText("Gerenciador De Aplicativos");
jContentPane = new JPanel();
jContentPane.setLayout(null);
jContentPane.add(getJTabbedPane(), null);
jContentPane.add(jlbTitulo, null);
jContentPane.add(getJbtSobre(), null);
jContentPane.add(getjbtInformacao(), null);
jContentPane.add(jlbRelogio, null);
jContentPane.add(jlbData, null);
jContentPane.add(getJrbMetal(), null);
jContentPane.add(getJrbMotif(), null);
jContentPane.add(getJrbWindows(), null);
jContentPane.add(getJrbWindowsClassico(), null);
jContentPane.add(getJrbNimbus(), null);
}
return jContentPane;
}
@Override
public void keyPressed(KeyEvent e) {
// Direcional Meu Computador
if (e.getSource() == jbtWindowsMeuComputador) {
if (e.getKeyCode() == Event.ENTER) {
AbrirDiretorios.AbrirMeuComputador();
}
// Direcional Meu computador
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
jbtWindowsMeusDocumentos.requestFocus();
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtSobre.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsCalculadora.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
// Direcional Meus Documentos
if (e.getSource() == jbtWindowsMeusDocumentos) {
if (e.getKeyCode() == Event.ENTER) {
AbrirDiretorios.AbrirMeusDocumentos();
}
// Direcional Meus Documentos
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
jbtWindowsMinhasImagens.requestFocus();
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtWindowsMeuComputador.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsNotepad.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
// Direcional Minhas Imagens
if (e.getSource() == jbtWindowsMinhasImagens) {
if (e.getKeyCode() == Event.ENTER) {
AbrirDiretorios.AbrirMinhasImagens();
}
// Direcional Minhas Imagens
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
jbtWindowsMinhasMusicas.requestFocus();
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtWindowsMeusDocumentos.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsWord.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
// Direcional Minhas Músicas
if (e.getSource() == jbtWindowsMinhasMusicas) {
if (e.getKeyCode() == Event.ENTER) {
AbrirDiretorios.AbrirMinhasMusicas();
}
// Direcional Minhas Musicas
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
jbtWindowsMeusVideos.requestFocus();
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtWindowsMinhasImagens.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsExcel.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
if (e.getSource() == jbtWindowsMeusVideos) {
if (e.getKeyCode() == Event.ENTER) {
AbrirDiretorios.AbrirMeusVideos();
}
// Direcional Meus Videos
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
jbtWindowsDiscoC.requestFocus();
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtWindowsMinhasMusicas.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsPowerpoint.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
// Direcional Disco C
if (e.getSource() == jbtWindowsDiscoC) {
if (e.getKeyCode() == Event.ENTER) {
AbrirDiretorios.AbrirC();
}
// Direcional Disco C
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
jbtWindowsDiscoD.requestFocus();
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtWindowsMeusVideos.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsOutLook.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
// Direcional Disco D
if (e.getSource() == jbtWindowsDiscoD) {
if (e.getKeyCode() == Event.ENTER) {
AbrirDiretorios.AbrirD();
}
// Direcional Disco D
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
jbtWindowsLixeira.requestFocus();
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtWindowsDiscoC.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsPaint.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
// Direcional Lixeira
if (e.getSource() == jbtWindowsLixeira) {
if (e.getKeyCode() == Event.ENTER) {
AbrirDiretorios.AbrirD();
}
// Direcional Disco D
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtWindowsDiscoD.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsPhotoshop.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}// ****************************************1ª Coluna de Icones
// Direcional Calculadora
if (e.getSource() == jbtWindowsCalculadora) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("calc");
} catch (IOException ea) {
}
}
// Direcional Calculadora
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
jbtWindowsNotepad.requestFocus();
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtSobre.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsExplore.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
jbtWindowsMeuComputador.requestFocus();
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
// Direcional Notepad
if (e.getSource() == jbtWindowsNotepad) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
notepad.exe");
} catch (IOException ea) {
}
}
// Direcional Notepad
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
jbtWindowsWord.requestFocus();
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtWindowsCalculadora.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsFirefox.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
jbtWindowsMeusDocumentos.requestFocus();
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
// Direcional Word
if (e.getSource() == jbtWindowsWord) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
winword.exe");
} catch (IOException ea) {
}
}
// Direcional Word
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
jbtWindowsExcel.requestFocus();
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtWindowsNotepad.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsChrome.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
jbtWindowsMinhasImagens.requestFocus();
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
// Direcional Excel
if (e.getSource() == jbtWindowsExcel) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
excel.exe");
} catch (IOException ea) {
}
}
// Direcional Excel
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
jbtWindowsPowerpoint.requestFocus();
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtWindowsWord.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsOpera.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
jbtWindowsMinhasMusicas.requestFocus();
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
// Direcional PowerPoint
if (e.getSource() == jbtWindowsPowerpoint) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
powerpnt.exe");
} catch (IOException ea) {
}
}
// Direcional PowerPoint
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
jbtWindowsOutLook.requestFocus();
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtWindowsExcel.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsSafari.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
jbtWindowsMeusVideos.requestFocus();
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
// Direcional outLook
if (e.getSource() == jbtWindowsOutLook) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
msimn.exe");
} catch (IOException ea) {
}
}
// Direcional Outlook
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
jbtWindowsPaint.requestFocus();
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtWindowsPowerpoint.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsNetscape.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
jbtWindowsDiscoC.requestFocus();
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
// Direcional Paint
if (e.getSource() == jbtWindowsPaint) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
mspaint.exe");
} catch (IOException ea) {
}
}
// Direcional Paint
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
jbtWindowsPhotoshop.requestFocus();
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtWindowsOutLook.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsEbuddy.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
jbtWindowsDiscoD.requestFocus();
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
// Direcional PhotoShop
if (e.getSource() == jbtWindowsPhotoshop) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
Photoshop.exe");
} catch (Exception e2) {
}
}
// Direcional Paint
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtWindowsPaint.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsMovieMaker.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
jbtWindowsLixeira.requestFocus();
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}// ****************************************2ª Coluna de Icones
if (e.getSource() == jbtWindowsMSN) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
msnmsgr.exe");
} catch (IOException ea) {
}
}
}
if (e.getSource() == jbtWindowsSkype) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
skype.exe");
} catch (IOException ea) {
}
}
}
if (e.getSource() == jbtWindowsPowerDVD) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
PowerDVD.exe");
} catch (IOException ea) {
}
}
}
if (e.getSource() == jbtWindowsNero) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
nero.exe");
} catch (IOException ea) {
}
}
}
if (e.getSource() == jbtWindowsMediaPlayer) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
wmplayer.exe");
} catch (IOException ea) {
}
}
}
if (e.getSource() == jbtWindowsRealPlayer) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
realplay.exe");
} catch (IOException ea) {
}
}
}
if (e.getSource() == jbtWindowsLimparDisco) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
cleanmgr.exe");
} catch (IOException ea) {
}
}
}
if (e.getSource() == jbtWindowsTecladoVirtual) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
Osk.exe");
} catch (IOException ea) {
}
}
}
if (e.getSource() == jbtWindowsSpider) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
spider.exe");
} catch (IOException ea) {
}
}
}
if (e.getSource() == jbtWindowsPaciencia) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
Sol.exe");
} catch (IOException ea) {
}
}
}
if (e.getSource() == jbtWindowsIp) {
if (e.getKeyCode() == Event.ENTER) {
try {
InetAddress localaddr = InetAddress.getLocalHost();
JOptionPane.showMessageDialog(null, "Endereço de IP :
"
+ localaddr.getHostAddress()
+ "\nNome da máquina : " +
localaddr.getHostName()
+ JOptionPane.PLAIN_MESSAGE);
} catch (UnknownHostException ea) {
JOptionPane.showMessageDialog(null,
"Não foi possivel localizar o IP : " + e
+ JOptionPane.PLAIN_MESSAGE);
}
}
}
// Direcional Windows Logo
if (e.getSource() == jbtWindowsLogo) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
winver.exe");
} catch (IOException ea) {
JOptionPane.showMessageDialog(null,
"Seu sistema operacional não é Windows é \n"
+ System.getProperty("os.name"));
}
}
// Direcional Windows Logo
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsFacebook.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
jbtWindowsExplore.requestFocus();
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
// ****************************************3ª Coluna de Icones
if (e.getSource() == jbtWindowsExplore) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
iexplore.exe");
} catch (IOException ea) {
}
}
// Direcional Internet Explore
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
jbtWindowsFirefox.requestFocus();
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtSobre.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsFacebook.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
jbtWindowsCalculadora.requestFocus();
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
// Direcional FireFox
if (e.getSource() == jbtWindowsFirefox) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
firefox.exe");
} catch (IOException ea) {
}
}
// Direcional FireFox
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
jbtWindowsChrome.requestFocus();
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtWindowsExplore.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsOrkut.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
jbtWindowsNotepad.requestFocus();
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
// Direcional Chrome
if (e.getSource() == jbtWindowsChrome) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
chrome.exe");
} catch (IOException ea) {
}
}
// Direcional Chrome
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
jbtWindowsOpera.requestFocus();
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtWindowsFirefox.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsMyspace.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
jbtWindowsWord.requestFocus();
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
// Direcional Opera
if (e.getSource() == jbtWindowsOpera) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
opera.exe");
} catch (IOException ea) {
}
}
// Direcional Opera
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
jbtWindowsSafari.requestFocus();
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtWindowsChrome.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsTwitter.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
jbtWindowsExcel.requestFocus();
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
// Direcional Safari
if (e.getSource() == jbtWindowsSafari) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
safari.exe");
} catch (IOException ea) {
}
}
// Direcional Safari
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
jbtWindowsNetscape.requestFocus();
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtWindowsOpera.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsBlogger.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
jbtWindowsPowerpoint.requestFocus();
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
// Direcional NetScape
if (e.getSource() == jbtWindowsNetscape) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
netscape.exe");
} catch (IOException ea) {
}
}
// Direcional NetScape
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
jbtWindowsEbuddy.requestFocus();
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtWindowsSafari.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsLinkedIn.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
jbtWindowsOutLook.requestFocus();
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
// Direcional Ebuddy
if (e.getSource() == jbtWindowsEbuddy) {
if (e.getKeyCode() == Event.ENTER) {
BareBonesBrowserLaunch.openURL("http://web.ebuddy.com");
}
// Direcional Ebuddy
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
jbtWindowsMovieMaker.requestFocus();
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtWindowsNetscape.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsFlickr.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
jbtWindowsPaint.requestFocus();
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}
// Direcional Movie Maker
if (e.getSource() == jbtWindowsMovieMaker) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
moviemk.exe");
} catch (IOException e1) {
e1.printStackTrace();
}
}
// Direcional Movie Maker
switch (e.getKeyCode()) {
case KeyEvent.VK_DOWN:
// ...Pra Baixo
System.out.println("DOWN");
break;
case KeyEvent.VK_UP:
// ...Pra Cima
jbtWindowsEbuddy.requestFocus();
System.out.println("UP");
break;
case KeyEvent.VK_RIGHT:
// ... Pra Direita
jbtWindowsLogo.requestFocus();
System.out.println("RIGHT");
break;
case KeyEvent.VK_LEFT:
// ...Pra Esquerda
jbtWindowsPhotoshop.requestFocus();
System.out.println("LEFT");
break;
case KeyEvent.VK_ENTER:
// ...
System.out.println("ENTER");
break;
}
}// ****************************************3ª Coluna de Icones
if (e.getSource() == jbtWindowsRelogio) {
if (e.getKeyCode() == Event.ENTER) {
try {
Runtime.getRuntime().exec("cmd.exe /c start
timedate.cpl");
} catch (IOException ea) {
}
}
}
}
@Override
public void keyReleased(KeyEvent arg0) {
// Tecla foi solta
}
@Override
public void keyTyped(KeyEvent arg0) {
// Tecla Unicode foi pressionada
}
@Override
public void actionPerformed(ActionEvent e) {
GregorianCalendar calendario = new GregorianCalendar();
int h = calendario.get(GregorianCalendar.HOUR_OF_DAY);
int m = calendario.get(GregorianCalendar.MINUTE);
int s = calendario.get(GregorianCalendar.SECOND);
String hora = ((h < 10) ? "0" : "") + h + ":" + ((m < 10) ? "0" :
"")
+ m + ":" + ((s < 10) ? "0" : "") + s;
jlbRelogio.setText(hora);
}
public void atualiza(int i) {
try {
UIManager.setLookAndFeel(looks[i].getClassName());
SwingUtilities.updateComponentTreeUI(this);
} catch (Exception e) {
e.printStackTrace();
}
}
public class ItemSelecionado implements ItemListener {
public void itemStateChanged(ItemEvent e) {
for (int i = 0; i < escolha.length; i++) {
if (escolha[i].isSelected())
atualiza(i);
}
}
}
// Metodo verificar conecxão
private void verificarConecxao() {
try {
URL mandarMail = new URL("http://www.google.com.br");
URLConnection conn = mandarMail.openConnection();
HttpURLConnection httpConn = (HttpURLConnection) conn;
httpConn.connect();
int x = httpConn.getResponseCode();
if (x == 200) {
// System.out.println("Conectado");
jlbConexao.setFont(new Font("Arial", Font.BOLD, 18));
jlbConexao.setForeground(Color.BLUE);
jlbConexao.setText("Você esta conectado.");
}
} catch (MalformedURLException urlmal) {
} catch (IOException ioexcp) {
jlbConexao.setFont(new Font("Arial", Font.BOLD, 18));
jlbConexao.setForeground(Color.RED);
jlbConexao.setText("Você NÃO esta conectado!");
}
}
} // @jve:decl-index=0:visual-constraint="4,-6"
Download