elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Recopilación Tutoriales y Manuales Hacking, Seguridad, Privacidad, Hardware, etc


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  Java
| | | |-+  Dudas con cosas graficas para mi simulacion de MSN en cutre :P (Help plz)
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Dudas con cosas graficas para mi simulacion de MSN en cutre :P (Help plz)  (Leído 3,979 veces)
Luisango


Desconectado Desconectado

Mensajes: 313



Ver Perfil WWW
Dudas con cosas graficas para mi simulacion de MSN en cutre :P (Help plz)
« en: 10 Mayo 2007, 21:49 pm »

Hola!
Hace poco tiempo me meti con las interfaces graficas en java, usando netbeans (5.5), y no se mucho de usar cosas junto con las interfaces graficas, bueno, el problema es el siguiente, hoy me he puesto a hacer un MSN simulado y encima cutre :P, y tengo varios problemas a la hora de hacer cosillas, aqui os pongo los problemas:
Código:
Al hacer la lista de contactos, no se como se hace una tabla o como seria de agregar una fila o quitarla
No se poner imagenes
No se si se pueden poner imagenes de fondo en los JPanel, JText, JSelectBox, etc, y si se pone como se haria
No se si utilizo bien la accion de un JText para que actualize el nick o cualquier String o variable de ejemplar (o algo)
Y creo que nada mas.

Bueno, a continuacion os pongo el codigo del "programa" y el link con las instrucciones para ejecutar el .jar:
Código:
package wmsn;

import java.awt.event.*;
import javax.swing.*;

public class escritorio extends JFrame {
   
    // VARIABLES DE EJEMPLAR ________________________________________________________________
    String wmsnCFG_Nick;
    String wmsnCFG_PMessage;
    String wmsnCFG_Status;
    String wmsnCFG_C_Say;
    String wmsnCFG_C_MsgSent;
    String wmsnCFG_C_ClrMsg;
    String wmsnCFG_C_ConvAd;
    String wmsnCFG_C_JMsgrTitle;
    String wmsnCFG_C_CWindowTitle;
   
    /** Creates new form escritorio */
    public escritorio() {
        initComponents();
       
        // Configuracion de los textos...
            // Configuracion del perfil
            wmsnCFG_Nick           = "The Sixth Halcon";
            wmsnCFG_PMessage       = "Este es mi mensaje personal";
            String wmsnCFG_Status  = "Conectado";
           
            // Configuracion de otros textos
            wmsnCFG_C_Say          = " dice:";
            wmsnCFG_C_MsgSent      = "Mensaje enviado";
            wmsnCFG_C_ClrMsg       = "Texto borrado";
            wmsnCFG_C_ConvAd       = "No revele sus contraseñas a nadie. \n" +
                                     "______________________________";
            wmsnCFG_C_JMsgrTitle   = " - Java Messenger";
            wmsnCFG_C_CWindowTitle = "Contactos";
       
       
       
        // Configuracion media...
        int L_PMsg = wmsnCFG_PMessage.length();
        String a = "";
       
        if (!(L_PMsg <= 97)){
            L_PMsg = 97;
            a = "...";
        } //Fin if
        wmsnCFG_PMessage = wmsnCFG_PMessage.substring(0, L_PMsg)+a;
       
       
       
       
        // Configurando las ventanas...
            // Ventana de contactos
            wmsnContactsWindow.setTitle(wmsnCFG_C_CWindowTitle);
            wmsnNick.setText(wmsnCFG_Nick);
            wmsnPersonalMessage.setText(wmsnCFG_PMessage);
            wmsnStatus.setText(wmsnCFG_Status);
           
            // Ventana de conversacion
            wmsnChatWindow.setTitle(wmsnCFG_Nick+" -|"+wmsnCFG_Status+"|- "+wmsnCFG_C_JMsgrTitle);
            wmsn_T_PersonalMessage.setText(wmsnCFG_PMessage);
            wmsnConversation.setText(wmsnCFG_C_ConvAd);
    }
   
   
   
    // INICIO DE LOS METODOS ________________________________________________________________
    public void sendMessage(){
        String t = wmsnText.getText();
        String x = wmsnConversation.getText();
        wmsnConversation.setText(x+"\n"+wmsnCFG_Nick+wmsnCFG_C_Say+"\n"+t);
        wmsnText.setText("");
        wmsnConsole.setText(wmsnCFG_C_MsgSent);   
    }
   
    public void clearInput(){
        wmsnText.setText(""); 
        wmsnConsole.setText(wmsnCFG_C_ClrMsg);
    }
   
    public void changeNick(){
        String a = wmsnNick.getText(); 
        wmsnCFG_Nick = a;
    }
   
    public void changePMsg(){
        String a = wmsnPersonalMessage.getText(); 
        wmsnCFG_PMessage = a;
    }
       
    public void changeStatus(){
        String a = wmsnStatus.getText(); 
        wmsnCFG_Status = a;
    }
    // FIN DE LOS METODOS ___________________________________________________________________
   
   
   
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">                         
    private void initComponents() {
        wmsnChatWindow = new javax.swing.JInternalFrame();
        jScrollPane1 = new javax.swing.JScrollPane();
        wmsnConversation = new javax.swing.JTextArea();
        jScrollPane2 = new javax.swing.JScrollPane();
        wmsnText = new javax.swing.JTextArea();
        wmsnSend = new javax.swing.JButton();
        wmsn_T_PersonalMessage = new javax.swing.JLabel();
        wmsnConsole = new javax.swing.JTextField();
        wmsnClearInput = new javax.swing.JButton();
        wmsnContactsWindow = new javax.swing.JInternalFrame();
        wmsn_JP_ProfileConfiguration = new javax.swing.JPanel();
        wmsnNick = new javax.swing.JTextField();
        wmsnPersonalMessage = new javax.swing.JTextField();
        wmsn_JP_Photo = new javax.swing.JPanel();
        wmsnStatus = new javax.swing.JTextField();
        wmsn_JP_ContactList = new javax.swing.JPanel();
        jTextField1 = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jMenuBar1 = new javax.swing.JMenuBar();
        wmsnGeneralMenu = new javax.swing.JMenu();
        wmsn_GM_Exit = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("CutreMSN");
        wmsnChatWindow.setIconifiable(true);
        wmsnChatWindow.setMaximizable(true);
        wmsnChatWindow.setVisible(true);
        wmsnConversation.setColumns(20);
        wmsnConversation.setEditable(false);
        wmsnConversation.setRows(5);
        jScrollPane1.setViewportView(wmsnConversation);

        wmsnText.setColumns(20);
        wmsnText.setRows(5);
        jScrollPane2.setViewportView(wmsnText);

        wmsnSend.setText("Enviar");
        wmsnSend.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                wmsnSendActionPerformed(evt);
            }
        });

        wmsn_T_PersonalMessage.setForeground(new java.awt.Color(153, 153, 153));

        wmsnConsole.setBackground(new java.awt.Color(235, 233, 237));
        wmsnConsole.setEditable(false);
        wmsnConsole.setForeground(new java.awt.Color(153, 153, 153));
        wmsnConsole.setMargin(new java.awt.Insets(0, 0, 0, 0));

        wmsnClearInput.setText("Borrar");
        wmsnClearInput.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                wmsnClearInputActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout wmsnChatWindowLayout = new org.jdesktop.layout.GroupLayout(wmsnChatWindow.getContentPane());
        wmsnChatWindow.getContentPane().setLayout(wmsnChatWindowLayout);
        wmsnChatWindowLayout.setHorizontalGroup(
            wmsnChatWindowLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, wmsnConsole, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 609, Short.MAX_VALUE)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, wmsnChatWindowLayout.createSequentialGroup()
                .addContainerGap()
                .add(wmsnChatWindowLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 589, Short.MAX_VALUE)
                    .add(wmsnChatWindowLayout.createSequentialGroup()
                        .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 474, Short.MAX_VALUE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(wmsnChatWindowLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(wmsnClearInput, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 109, Short.MAX_VALUE)
                            .add(wmsnSend, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 109, Short.MAX_VALUE)))
                    .add(org.jdesktop.layout.GroupLayout.LEADING, wmsn_T_PersonalMessage, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 589, Short.MAX_VALUE))
                .addContainerGap())
        );
        wmsnChatWindowLayout.setVerticalGroup(
            wmsnChatWindowLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(wmsnChatWindowLayout.createSequentialGroup()
                .add(wmsn_T_PersonalMessage)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 486, Short.MAX_VALUE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(wmsnChatWindowLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 103, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, wmsnChatWindowLayout.createSequentialGroup()
                        .add(wmsnSend, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(wmsnClearInput)))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(wmsnConsole, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
        );

        wmsnContactsWindow.setIconifiable(true);
        wmsnContactsWindow.setVisible(true);
        wmsn_JP_ProfileConfiguration.setBackground(new java.awt.Color(255, 255, 255));
        wmsn_JP_ProfileConfiguration.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        wmsnNick.setBackground(new java.awt.Color(235, 233, 237));
        wmsnNick.setMargin(new java.awt.Insets(0, 0, 0, 0));

        wmsnPersonalMessage.setBackground(new java.awt.Color(235, 233, 237));
        wmsnPersonalMessage.setMargin(new java.awt.Insets(0, 0, 0, 0));

        wmsn_JP_Photo.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        org.jdesktop.layout.GroupLayout wmsn_JP_PhotoLayout = new org.jdesktop.layout.GroupLayout(wmsn_JP_Photo);
        wmsn_JP_Photo.setLayout(wmsn_JP_PhotoLayout);
        wmsn_JP_PhotoLayout.setHorizontalGroup(
            wmsn_JP_PhotoLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 69, Short.MAX_VALUE)
        );
        wmsn_JP_PhotoLayout.setVerticalGroup(
            wmsn_JP_PhotoLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 66, Short.MAX_VALUE)
        );

        wmsnStatus.setBackground(new java.awt.Color(235, 233, 237));
        wmsnStatus.setMargin(new java.awt.Insets(0, 0, 0, 0));

        org.jdesktop.layout.GroupLayout wmsn_JP_ProfileConfigurationLayout = new org.jdesktop.layout.GroupLayout(wmsn_JP_ProfileConfiguration);
        wmsn_JP_ProfileConfiguration.setLayout(wmsn_JP_ProfileConfigurationLayout);
        wmsn_JP_ProfileConfigurationLayout.setHorizontalGroup(
            wmsn_JP_ProfileConfigurationLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, wmsn_JP_ProfileConfigurationLayout.createSequentialGroup()
                .add(wmsn_JP_Photo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(wmsn_JP_ProfileConfigurationLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(wmsnStatus, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 162, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(wmsnNick, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 312, Short.MAX_VALUE)
                    .add(wmsnPersonalMessage, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 312, Short.MAX_VALUE)))
        );
        wmsn_JP_ProfileConfigurationLayout.setVerticalGroup(
            wmsn_JP_ProfileConfigurationLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(wmsn_JP_ProfileConfigurationLayout.createSequentialGroup()
                .add(wmsn_JP_ProfileConfigurationLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(wmsn_JP_ProfileConfigurationLayout.createSequentialGroup()
                        .add(wmsnNick, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(wmsnPersonalMessage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(wmsnStatus, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(wmsn_JP_Photo, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        wmsn_JP_ContactList.setBackground(new java.awt.Color(255, 255, 255));
        wmsn_JP_ContactList.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        jTextField1.setBackground(new java.awt.Color(235, 233, 237));
        jTextField1.setText("Buscar un contacto");
        jTextField1.setMargin(new java.awt.Insets(0, 0, 0, 0));

        jButton1.setText("+M");

        org.jdesktop.layout.GroupLayout wmsn_JP_ContactListLayout = new org.jdesktop.layout.GroupLayout(wmsn_JP_ContactList);
        wmsn_JP_ContactList.setLayout(wmsn_JP_ContactListLayout);
        wmsn_JP_ContactListLayout.setHorizontalGroup(
            wmsn_JP_ContactListLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(wmsn_JP_ContactListLayout.createSequentialGroup()
                .addContainerGap()
                .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 328, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jButton1)
                .addContainerGap())
        );
        wmsn_JP_ContactListLayout.setVerticalGroup(
            wmsn_JP_ContactListLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(wmsn_JP_ContactListLayout.createSequentialGroup()
                .add(wmsn_JP_ContactListLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jButton1)
                    .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(469, Short.MAX_VALUE))
        );

        org.jdesktop.layout.GroupLayout wmsnContactsWindowLayout = new org.jdesktop.layout.GroupLayout(wmsnContactsWindow.getContentPane());
        wmsnContactsWindow.getContentPane().setLayout(wmsnContactsWindowLayout);
        wmsnContactsWindowLayout.setHorizontalGroup(
            wmsnContactsWindowLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, wmsn_JP_ProfileConfiguration, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .add(wmsn_JP_ContactList, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        wmsnContactsWindowLayout.setVerticalGroup(
            wmsnContactsWindowLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(wmsnContactsWindowLayout.createSequentialGroup()
                .add(wmsn_JP_ProfileConfiguration, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(wmsn_JP_ContactList, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        wmsnGeneralMenu.setText("Archivo");
        wmsn_GM_Exit.setText("Salir");
        wmsn_GM_Exit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                wmsn_GM_ExitActionPerformed(evt);
            }
        });

        wmsnGeneralMenu.add(wmsn_GM_Exit);

        jMenuBar1.add(wmsnGeneralMenu);

        setJMenuBar(jMenuBar1);

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(wmsnContactsWindow, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(wmsnChatWindow, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(166, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, wmsnChatWindow)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, wmsnContactsWindow))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pack();
    }// </editor-fold>                       

    private void wmsn_GM_ExitActionPerformed(java.awt.event.ActionEvent evt) {                                             
        System.exit(0);
    }                                           

    private void wmsnClearInputActionPerformed(java.awt.event.ActionEvent evt) {                                               
        clearInput();
    }                                             

    private void wmsnSendActionPerformed(java.awt.event.ActionEvent evt) {                                         
        sendMessage();
    }                                       
   
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                JFrame frame = new escritorio();
                frame.setVisible(true);
            }
        });
    }
   
   
    // Variables declaration - do not modify                     
    private javax.swing.JButton jButton1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JInternalFrame wmsnChatWindow;
    private javax.swing.JButton wmsnClearInput;
    private javax.swing.JTextField wmsnConsole;
    private javax.swing.JInternalFrame wmsnContactsWindow;
    private javax.swing.JTextArea wmsnConversation;
    private javax.swing.JMenu wmsnGeneralMenu;
    private javax.swing.JTextField wmsnNick;
    private javax.swing.JTextField wmsnPersonalMessage;
    private javax.swing.JButton wmsnSend;
    private javax.swing.JTextField wmsnStatus;
    private javax.swing.JTextArea wmsnText;
    private javax.swing.JMenuItem wmsn_GM_Exit;
    private javax.swing.JPanel wmsn_JP_ContactList;
    private javax.swing.JPanel wmsn_JP_Photo;
    private javax.swing.JPanel wmsn_JP_ProfileConfiguration;
    private javax.swing.JLabel wmsn_T_PersonalMessage;
    // End of variables declaration                   
   
}


Y aqui os dejo el link del rar para que lo descomprimais, si no sabes como ejecutarlo dentro hay un txt con las instrucciones a seguir ;)
http://rapidshare.com/files/30597143/Java_MSN_Cutre.rar.html

Por si no fui concreto, querria que me explicarais como resolver las dudas que tengo.

Gracias de antemano!


« Última modificación: 10 Mayo 2007, 22:04 pm por The Sixth Halcon » En línea

Even better...
Casidiablo
Desarrollador
Colaborador
***
Desconectado Desconectado

Mensajes: 2.919



Ver Perfil WWW
Re: Dudas con cosas graficas para mi simulacion de MSN en cutre :P (Help plz)
« Respuesta #1 en: 10 Mayo 2007, 23:08 pm »

Ya lo revisaré... que ahora no estoy en un computador con el SDK, solo un consejo (para justificar mi post):

Aprende a programar interfaces gráficas a base de código, y no utilizando editores de ventanas como los que trae el NetBeans (excelente IDE por cierto). O dime ¿qué entiendes de todo ese código? Se, se, se... muy profesional, muy lindo, muy organizado, pero sino sabes en escencia que es lo que realmente hiciste, pues no tiene gracia.

Por lo que dices estás aprendiendo... lamentablemente estos IDE's no enseñan, simplemente agilizan el trabajo. Claro, su uso es decisión tuya, pero ese fue mi consejo.

Un saludo.


En línea

Luisango


Desconectado Desconectado

Mensajes: 313



Ver Perfil WWW
Re: Dudas con cosas graficas para mi simulacion de MSN en cutre :P (Help plz)
« Respuesta #2 en: 10 Mayo 2007, 23:43 pm »

Pues lo que hace es crear objetos de diferentes clases, asignarles nombres y propiedades, ya se que no enseña, pero ahora no estoy para aprender mucho codigo, y bien especificado, he aprendido algo basico de java gracias a este manual que ha hecho mi profesor de tecnologias de la informacion:

http://rm.ayudapc.info/java_manual.pdf (el manual es libre de distribucion, pero tiene copyright, podeis difundirlo siempre que no cambieis el nombre del autor jeje)

Estamos haciendo programitas como una tienda con cosas y todo eso pero la interfaz grafica nos la da el ya hecha y nosotros la ensamblamos al proyecto, yo, soy el tipico alumno friki que le gusta un monton esto y sabe un monton mas que unos cuantos paletos de clase que no saben darle a una tecla (pero tengo vida social ehhh :xD) y quiero aprender a hacer interfaces graficas de momento de manera rapida, porque no tengo mucho tiempo para aprender codigo, solo el necesario, ya que estoy en plenos examenes y son decisivos para entrar en una universidad, por eso quiero aprender, de esta manera.

PD: Ya he hecho lo de que cuando escribas en un campo de texto se vea al instante, aqui dejo el codigo de los metodos:

Código:
    public void changeNick(){
        String a = wmsnNick.getText(); 
        wmsnCFG_Nick = a;
        wmsnChatWindow.setTitle(wmsnCFG_Nick+" -|"+wmsnCFG_Status+"|- "+wmsnCFG_C_JMsgrTitle);
    }
   
    public void changeStatus(){
        String a = wmsnStatus.getText(); 
        wmsnCFG_Status = a;
        wmsnChatWindow.setTitle(wmsnCFG_Nick+" -|"+wmsnCFG_Status+"|- "+wmsnCFG_C_JMsgrTitle);
    }
   
    public void changePMsg(){
        String a = wmsnPersonalMessage.getText(); 
        wmsnCFG_PMessage = a;
        wmsnPersonalMessage.setText(wmsnCFG_PMessage);
    }   
   
private void wmsnStatusKeyTyped(java.awt.event.KeyEvent evt) {                                   
        changeStatus();
    }                                   

    private void wmsnPersonalMessageKeyTyped(java.awt.event.KeyEvent evt) {                                             
        changePMsg();
    }                                           

    private void wmsnNickKeyTyped(java.awt.event.KeyEvent evt) {                                 
        changeNick();
    }       

PD2: Aprendo mas facilmente a base de ver codigo y modificarlo a ver que pasa, que con una teoria para estudiar, asi aprendi php :P
En línea

Even better...
Casidiablo
Desarrollador
Colaborador
***
Desconectado Desconectado

Mensajes: 2.919



Ver Perfil WWW
Re: Dudas con cosas graficas para mi simulacion de MSN en cutre :P (Help plz)
« Respuesta #3 en: 11 Mayo 2007, 22:37 pm »


PD2: Aprendo mas facilmente a base de ver codigo y modificarlo a ver que pasa, que con una teoria para estudiar, asi aprendi php :P

Pues en eso tienes razón... si así aprendes más pues adelante!!! La verdad cada persona aprende de diferentes formas, lo único importante es que aprendas...

Saludos!!!

pd. No he podido probar el código, el trabajo me está matando :(
En línea

Luisango


Desconectado Desconectado

Mensajes: 313



Ver Perfil WWW
Re: Dudas con cosas graficas para mi simulacion de MSN en cutre :P (Help plz)
« Respuesta #4 en: 16 Mayo 2007, 20:20 pm »

Cuando tengas tiempo si quieres lo pruebas no hay problema....

Si alguien sabe como agregar imagenes, tanto de fondo como estaticas o para hacer caracteristicas como el fondo de los jtextarea, jPanel, jText,jetc.... que lo postee aqui por favor :P


Gracias!
En línea

Even better...
Casidiablo
Desarrollador
Colaborador
***
Desconectado Desconectado

Mensajes: 2.919



Ver Perfil WWW
Re: Dudas con cosas graficas para mi simulacion de MSN en cutre :P (Help plz)
« Respuesta #5 en: 16 Mayo 2007, 20:59 pm »

Eaaaa, pues aun nada que me queda tiempo... para lo de las imágenes del fondo, recuerdo que alguna vez usé el siguiente método: coloqué un Jpanel atrás y éste contenia una imagen, luego, coloqué encima del JPanel un JEditorPane, en el cual se mostraban las cosas del chat (texto + emoticones), pero al JEditorPane lo puse transparente. La funcion era algo así como setOpaque(true), o algo así... no recuerdo.

Saludos!!!
En línea

Luisango


Desconectado Desconectado

Mensajes: 313



Ver Perfil WWW
Re: Dudas con cosas graficas para mi simulacion de MSN en cutre :P (Help plz)
« Respuesta #6 en: 21 Mayo 2007, 21:58 pm »

He hablado con mi profesor y no sabe como poner imagenes xDDD lo que si me dijo era poner una imagen en un Jlabel, eso me dijo que si funcionaba, a ver si es verdad y si tengo tiempo lo pruebo jeje
En línea

Even better...
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Software para simulacion de GPS o similar
Dispositivos Móviles (PDA's, Smartphones, Tablets)
Hadess_inf 0 2,794 Último mensaje 14 Marzo 2013, 22:59 pm
por Hadess_inf
¿ayuda para elección para una simulación?
Programación General
faosxmb 0 1,579 Último mensaje 31 Enero 2017, 20:20 pm
por faosxmb
Un par de dudas sobre cosas que mencionaron otros usuarios.
Dudas Generales
Tachikomaia 3 957 Último mensaje 12 Marzo 2024, 17:01 pm
por Danielㅤ
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines