darkilopez
Usuario (Argentina)
Bueno en esta lista mostrare los juegos que he probado en mi Notebook (con Windows 7) y una lista aparte de juegos probados en Windows 7, como no puedo editar el post, tendre que ir agregando (cuando pueda) mas juegos en los comentarios : * Championship Manager 08 * Medieval Total War 2 * Crysis – Left 4 Dead * X-Blades * Dead Space * King’s Bounty The Legend * The Witcher Enhanced Edition * Tomb Raider Underworld * CS: Source * GTA IV * COD 4 * COD 5 * Prince of Persia * Fallout 3 * Raindbow Six Vegas 2 * James Bond 007 Quantum of Solace * F.E.A.R. 2: Project Origin * The Elder Scrolls IV: Oblivion * Sins of a Solar Empire * Need for Speed Undercover * Mirror’s Edge * Starcraft * Diablo II * Assasin’s creed * Spore * Burnout paradise * Tom Clancy H.A.W.X * World of Goo * World In Conflict * Star Wars: Empire at War * Fallout 3 * Red alert 3 * Sacred 2 * Battlefield 2 * Chaos league * Fifa 09 * Fifa 08 * Need for Speed Most Wanted * Los Sims 2 (+ expansiones) * Virtual Tennis 3 Fuente: http://www.islabit.com/4038/lista-de-juegos-compatibles-con-windows-7.html Ahora los juegos probados por MI, (y algunos mediante ayuda de algunos conocidos): * Half Life- Version de 1998 y version No-Steam * Half Life: Blue Shift * Half Life: Opposing Force * Counter Strike 1.6 * Half Life 2 * Half Life 2: Episode 1 * Half Life 2: Episode 2 * Star Wars Battlefront 2 * Warcraft III * Medal of Honor: Allied Assault * Call of Duty 1 y 2 * Counter Strike: Source * GTA III * GTA San Andreas * Clive Barker’s Jericho * Trials Second Edition * Ghostbusters * Sherlock Holmes Vs Jack The Ripper * Infernal * Bad Rats * 911- First Responders * I-Fluid * Pure * Tales Of Valor * Velvet Assesins * Shellshock 2 * Penumbra * Clutch * Wanted * Wheelman * Bioshock * Crazy machines2 * Demigod * Red Nation * Lineage 4 * Hellbound * Prototype Dejen sus comentarios! y puntos
Hola a todos, les dejo un pequeño codigo que he hecho para implementar una ventana desvanecente de notificación del tipo popup, donde se pueden mostrar varios mensajes con su respectivo color. Clases utilizadas: # com.sun.awt.AWTUtilities # java.awt.BorderLayout # java.awt.Color # java.awt.Toolkit # java.awt.event.ActionEvent # java.awt.event.ActionListener # javax.swing.JButton # javax.swing.JDialog # javax.swing.JScrollPane # javax.swing.JTextPane # javax.swing.text.BadLocationException # javax.swing.text.SimpleAttributeSet # javax.swing.text.StyleConstants # javax.swing.text.StyledDocument # Thread # InterruptedException Sin más demoras, les paso el codigo. import com.sun.awt.AWTUtilities; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JScrollPane; import javax.swing.JTextPane; import javax.swing.text.BadLocationException; import javax.swing.text.SimpleAttributeSet; import javax.swing.text.StyleConstants; import javax.swing.text.StyledDocument; public class Hilo extends Thread { private Ventana ventana; private float opacidad = 0.3f; // opacidad inicial private final int TIEMPO = 5000; // tiempo en milisegundos que estara activa la ventana public Hilo() { ventana = new Ventana(); AWTUtilities.setWindowOpacity(ventana, 0.0f); ventana.setVisible(true); } public void agregarTexto(String msj, int tipoColor) { ventana.agregarTexto(msj, tipoColor); } @Override public void run() { try { hacerVisible(); Thread.sleep(TIEMPO); desvanecer(); ventana.dispose(); } catch (InterruptedException e) { System.err.println(e); } } private void hacerVisible() throws InterruptedException { opacidad = 0.3f; while (opacidad < 1) { AWTUtilities.setWindowOpacity(ventana, opacidad); opacidad += 0.03f; Thread.sleep(20); } } private void desvanecer() throws InterruptedException { opacidad = 1.0f; while (opacidad > 0) { AWTUtilities.setWindowOpacity(ventana, opacidad); opacidad -= 0.03f; Thread.sleep(20); } } public static void main(String[] args) { Hilo hilo = new Hilo(); hilo.agregarTexto("Hola Taringa!", 0); hilo.start(); hilo.agregarTexto("Hola Taringa!", 1); hilo.agregarTexto("Hola Taringa!", 2); } class Ventana extends JDialog { private final int BARRA_DE_ESTADO = 30; // Tamaño de la barra de estado en windows private SimpleAttributeSet attrib; private JScrollPane scrollPane; private JTextPane textoPane; private JButton btnCerrar; public Ventana() { iniciarComponentes(); ubicacionVentana(); attrib = new SimpleAttributeSet(); } private void ubicacionVentana() { int tamanioX = getWidth(); int tamanioY = getHeight(); int maxX = (int) Toolkit.getDefaultToolkit().getScreenSize().getWidth(); int maxY = (int) Toolkit.getDefaultToolkit().getScreenSize().getHeight(); // ubicacion de la ventana setLocation(maxX - tamanioX, maxY - tamanioY - BARRA_DE_ESTADO); } private void iniciarComponentes() { setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); scrollPane = new JScrollPane(); textoPane = new JTextPane(); btnCerrar = new JButton(); setAlwaysOnTop(true); // siempre arriba setPreferredSize(new java.awt.Dimension(280, 120)); // tamaño de la ventana setResizable(false); // no se puede modificar el tamaño setUndecorated(true); // no tiene los controles de estado scrollPane.setAutoscrolls(true); textoPane.setEditable(false); scrollPane.setViewportView(textoPane); getContentPane().add(scrollPane, BorderLayout.CENTER); btnCerrar.setText("Cerrar Ventana"); btnCerrar.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent evt) { dispose(); } }); getContentPane().add(btnCerrar, BorderLayout.PAGE_END); pack(); } public void agregarTexto(String msj, int tipoColor) { try { StyleConstants.setForeground(attrib, getColorTexto(tipoColor)); StyledDocument sd = textoPane.getStyledDocument(); if (!textoPane.getText().isEmpty()) { sd.insertString(sd.getLength(), "n", attrib); } sd.insertString(sd.getLength(), msj, attrib); } catch (BadLocationException e) { System.err.println(e); } } private Color getColorTexto(int tipo) { switch (tipo) { case 0: // Verde return new Color(0, 130, 0); case 1: // ROJO return new Color(255, 0, 0); default: // Negro return new Color(0, 0, 0); } } } } Seguro que existen un millon de formas de hacer lo mismo o un framework que lo realice. Espero que les sirva y cualquier pregunta estoy a su disposicion. Saludos (COMENTARIOS FUERA DE LUGAR SERAN BORRADOS Y BLOQUEADOS)
Hola a todos, les dejo un pequeño codigo que he hecho para impedir que una aplicacion se ejecute mas de una vez. De modo que cuando el usuario quiera ejecutar mas de una vez la aplicacion que hemos desarrollado, NO PODRA HACERLO.Clases que se ocupan:# File# RandomAccessFile# FileLockSin mas demoras, les paso el codigo. import java.io.File;import java.io.IOException;import java.io.RandomAccessFile;import java.nio.channels.FileLock;public class SinglentonApp { public static void main(String[] args){ if (lockInstance("file.lock")) { // nombre del archivo a bloquear new NuestraClaseMain(args); // Clase que arranca el programa } } } public static boolean lockInstance(final String lockFile) { try { final File file = new File(lockFile); final RandomAccessFile randomAccessFile = new RandomAccessFile(file, "rw"); final FileLock fileLock = randomAccessFile.getChannel().tryLock(); // intenta bloquear el archivo if (fileLock != null) { // si lo bloqueo Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { try { fileLock.release(); // Libera el bloqueo randomAccessFile.close(); // Cierra el stream file.deleteOnExit(); // Borra el archivo cuando se cierra el programa } catch (IOException e) { System.err.println(e); } } }); return true; } } catch (IOException e) { System.err.println(e); } return false; }} Existen varias maneras de realizar lo mismo, tambien se podria ocupar un ServerSocket(numeroPuerto) donde se produciria un error al intentar abrir un puerto ya ocupado.Espero que les sirva y cualquier pregunta estoy a su disposicion.Saludos(COMENTARIOS FUERA DE LUGAR SERAN BORRADOS Y BLOQUEADOS)